diff options
Diffstat (limited to 'include/i2c/i2c.h')
-rw-r--r-- | include/i2c/i2c.h | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/include/i2c/i2c.h b/include/i2c/i2c.h index de2a7ea27d..dc5e5fc99b 100644 --- a/include/i2c/i2c.h +++ b/include/i2c/i2c.h @@ -66,10 +66,12 @@ struct i2c_msg { * */ struct i2c_adapter { - struct device_d *dev; /* ptr to device */ + struct device_d dev; /* ptr to device */ int nr; /* bus number */ int (*master_xfer)(struct i2c_adapter *adap, struct i2c_msg *msgs, int num); struct list_head list; + int retries; + void *algo_data; }; @@ -127,6 +129,14 @@ static inline int i2c_register_board_info(int busnum, extern int i2c_add_numbered_adapter(struct i2c_adapter *adapter); struct i2c_adapter *i2c_get_adapter(int busnum); +/* For devices that use several addresses, use i2c_new_dummy() to make + * client handles for the extra addresses. + */ +extern struct i2c_client * +i2c_new_dummy(struct i2c_adapter *adap, u16 address); + + + extern int i2c_transfer(struct i2c_adapter *adap, struct i2c_msg *msgs, int num); extern int i2c_master_send(struct i2c_client *client, const char *buf, int count); extern int i2c_master_recv(struct i2c_client *client, char *buf, int count); |