diff options
-rw-r--r-- | Documentation/i2c/writing-clients | 5 | ||||
-rw-r--r-- | drivers/i2c/i2c-core.c | 4 | ||||
-rw-r--r-- | include/linux/i2c.h | 1 |
3 files changed, 6 insertions, 4 deletions
diff --git a/Documentation/i2c/writing-clients b/Documentation/i2c/writing-clients index 0a74603eb671..3219ee0dbfef 100644 --- a/Documentation/i2c/writing-clients +++ b/Documentation/i2c/writing-clients | |||
@@ -318,8 +318,9 @@ Plain I2C communication | |||
318 | These routines read and write some bytes from/to a client. The client | 318 | These routines read and write some bytes from/to a client. The client |
319 | contains the i2c address, so you do not have to include it. The second | 319 | contains the i2c address, so you do not have to include it. The second |
320 | parameter contains the bytes to read/write, the third the number of bytes | 320 | parameter contains the bytes to read/write, the third the number of bytes |
321 | to read/write (must be less than the length of the buffer.) Returned is | 321 | to read/write (must be less than the length of the buffer, also should be |
322 | the actual number of bytes read/written. | 322 | less than 64k since msg.len is u16.) Returned is the actual number of bytes |
323 | read/written. | ||
323 | 324 | ||
324 | int i2c_transfer(struct i2c_adapter *adap, struct i2c_msg *msg, | 325 | int i2c_transfer(struct i2c_adapter *adap, struct i2c_msg *msg, |
325 | int num); | 326 | int num); |
diff --git a/drivers/i2c/i2c-core.c b/drivers/i2c/i2c-core.c index 4131698008b9..3202a86f420e 100644 --- a/drivers/i2c/i2c-core.c +++ b/drivers/i2c/i2c-core.c | |||
@@ -1183,7 +1183,7 @@ EXPORT_SYMBOL(i2c_transfer); | |||
1183 | * i2c_master_send - issue a single I2C message in master transmit mode | 1183 | * i2c_master_send - issue a single I2C message in master transmit mode |
1184 | * @client: Handle to slave device | 1184 | * @client: Handle to slave device |
1185 | * @buf: Data that will be written to the slave | 1185 | * @buf: Data that will be written to the slave |
1186 | * @count: How many bytes to write | 1186 | * @count: How many bytes to write, must be less than 64k since msg.len is u16 |
1187 | * | 1187 | * |
1188 | * Returns negative errno, or else the number of bytes written. | 1188 | * Returns negative errno, or else the number of bytes written. |
1189 | */ | 1189 | */ |
@@ -1210,7 +1210,7 @@ EXPORT_SYMBOL(i2c_master_send); | |||
1210 | * i2c_master_recv - issue a single I2C message in master receive mode | 1210 | * i2c_master_recv - issue a single I2C message in master receive mode |
1211 | * @client: Handle to slave device | 1211 | * @client: Handle to slave device |
1212 | * @buf: Where to store data read from slave | 1212 | * @buf: Where to store data read from slave |
1213 | * @count: How many bytes to read | 1213 | * @count: How many bytes to read, must be less than 64k since msg.len is u16 |
1214 | * | 1214 | * |
1215 | * Returns negative errno, or else the number of bytes read. | 1215 | * Returns negative errno, or else the number of bytes read. |
1216 | */ | 1216 | */ |
diff --git a/include/linux/i2c.h b/include/linux/i2c.h index 476abd09c921..0a5da639b327 100644 --- a/include/linux/i2c.h +++ b/include/linux/i2c.h | |||
@@ -53,6 +53,7 @@ struct i2c_board_info; | |||
53 | * on a bus (or read from them). Apart from two basic transfer functions to | 53 | * on a bus (or read from them). Apart from two basic transfer functions to |
54 | * transmit one message at a time, a more complex version can be used to | 54 | * transmit one message at a time, a more complex version can be used to |
55 | * transmit an arbitrary number of messages without interruption. | 55 | * transmit an arbitrary number of messages without interruption. |
56 | * @count must be be less than 64k since msg.len is u16. | ||
56 | */ | 57 | */ |
57 | extern int i2c_master_send(struct i2c_client *client, const char *buf, | 58 | extern int i2c_master_send(struct i2c_client *client, const char *buf, |
58 | int count); | 59 | int count); |