Lines Matching refs:parport
2 * i2c-parport.c I2C bus over parallel port *
30 #include <linux/parport.h>
33 #include "i2c-parport.h"
48 static void port_write_data(struct parport *p, unsigned char d)
53 static void port_write_control(struct parport *p, unsigned char d)
58 static unsigned char port_read_data(struct parport *p)
63 static unsigned char port_read_status(struct parport *p)
68 static unsigned char port_read_control(struct parport *p)
73 static void (*port_write[])(struct parport *, unsigned char) = {
79 static unsigned char (*port_read[])(struct parport *) = {
87 static inline void line_set(struct parport *data, int state,
99 static inline int line_get(struct parport *data,
112 line_set((struct parport *) data, state, &adapter_parm[type].setscl);
117 line_set((struct parport *) data, state, &adapter_parm[type].setsda);
122 return line_get((struct parport *) data, &adapter_parm[type].getscl);
127 return line_get((struct parport *) data, &adapter_parm[type].getsda);
146 static void i2c_parport_attach (struct parport *port)
152 printk(KERN_ERR "i2c-parport: Failed to kzalloc\n");
156 pr_debug("i2c-parport: attaching to %s\n", port->name);
157 adapter->pdev = parport_register_device(port, "i2c-parport",
160 printk(KERN_ERR "i2c-parport: Unable to register with parport\n");
181 printk(KERN_ERR "i2c-parport: Could not claim parallel port\n");
195 printk(KERN_ERR "i2c-parport: Unable to register with I2C\n");
210 static void i2c_parport_detach (struct parport *port)
236 .name = "i2c-parport",
246 printk(KERN_WARNING "i2c-parport: adapter type unspecified\n");
251 printk(KERN_WARNING "i2c-parport: invalid type (%d)\n", type);