For now, you can ignore the `flags' parameter. It is there for future use.
- /* Unique ID allocation */
- static int foo_id = 0;
-
int foo_detect_client(struct i2c_adapter *adapter, int address,
unsigned short flags, int kind)
{
data->type = kind;
/* SENSORS ONLY END */
- new_client->id = foo_id++; /* Automatically unique */
data->valid = 0; /* Only if you use this field */
init_MUTEX(&data->update_lock); /* Only if you use this field */
parameter contains the bytes the read/write, the third the length of the
buffer. Returned is the actual number of bytes read/written.
- extern int i2c_transfer(struct i2c_adapter *adap, struct i2c_msg msg[],
+ extern int i2c_transfer(struct i2c_adapter *adap, struct i2c_msg *msg,
int num);
This sends a series of messages. Each message can be a read or write,