#define pr_fmt(fmt) …
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/init.h>
#include <linux/delay.h>
#include <linux/parport.h>
#include <linux/i2c.h>
#include <linux/i2c-algo-bit.h>
#include <linux/i2c-smbus.h>
#include <linux/slab.h>
#include <linux/list.h>
#include <linux/mutex.h>
#define PORT_DATA …
#define PORT_STAT …
#define PORT_CTRL …
struct lineop { … };
struct adapter_parm { … };
static const struct adapter_parm adapter_parm[] = …;
struct i2c_par { … };
static LIST_HEAD(adapter_list);
static DEFINE_MUTEX(adapter_list_lock);
#define MAX_DEVICE …
static int parport[MAX_DEVICE] = …;
module_param_array(…);
MODULE_PARM_DESC(…) …;
static int type = …;
module_param(type, int, 0);
MODULE_PARM_DESC(…) …;
static void port_write_data(struct parport *p, unsigned char d)
{ … }
static void port_write_control(struct parport *p, unsigned char d)
{ … }
static unsigned char port_read_data(struct parport *p)
{ … }
static unsigned char port_read_status(struct parport *p)
{ … }
static unsigned char port_read_control(struct parport *p)
{ … }
static void (* const port_write[])(struct parport *, unsigned char) = …;
static unsigned char (* const port_read[])(struct parport *) = …;
static inline void line_set(struct parport *data, int state,
const struct lineop *op)
{ … }
static inline int line_get(struct parport *data,
const struct lineop *op)
{ … }
static void parport_setscl(void *data, int state)
{ … }
static void parport_setsda(void *data, int state)
{ … }
static int parport_getscl(void *data)
{ … }
static int parport_getsda(void *data)
{ … }
static const struct i2c_algo_bit_data parport_algo_data = …;
static void i2c_parport_irq(void *data)
{ … }
static void i2c_parport_attach(struct parport *port)
{ … }
static void i2c_parport_detach(struct parport *port)
{ … }
static struct parport_driver i2c_parport_driver = …;
module_parport_driver(…) …;
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;