aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/i2c/i2c-core.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/i2c/i2c-core.c')
-rw-r--r--drivers/i2c/i2c-core.c17
1 files changed, 16 insertions, 1 deletions
diff --git a/drivers/i2c/i2c-core.c b/drivers/i2c/i2c-core.c
index f95b1b65761..5e58b5641a3 100644
--- a/drivers/i2c/i2c-core.c
+++ b/drivers/i2c/i2c-core.c
@@ -1307,7 +1307,22 @@ s32 i2c_smbus_write_word_data(struct i2c_client *client, u8 command, u16 value)
1307} 1307}
1308EXPORT_SYMBOL(i2c_smbus_write_word_data); 1308EXPORT_SYMBOL(i2c_smbus_write_word_data);
1309 1309
1310/* Returns the number of read bytes */ 1310/**
1311 * i2c_smbus_read_block_data - SMBus block read request
1312 * @client: Handle to slave device
1313 * @command: Command byte issued to let the slave know what data should
1314 * be returned
1315 * @values: Byte array into which data will be read; big enough to hold
1316 * the data returned by the slave. SMBus allows at most 32 bytes.
1317 *
1318 * Returns the number of bytes read in the slave's response, else a
1319 * negative number to indicate some kind of error.
1320 *
1321 * Note that using this function requires that the client's adapter support
1322 * the I2C_FUNC_SMBUS_READ_BLOCK_DATA functionality. Not all adapter drivers
1323 * support this; its emulation through I2C messaging relies on a specific
1324 * mechanism (I2C_M_RECV_LEN) which may not be implemented.
1325 */
1311s32 i2c_smbus_read_block_data(struct i2c_client *client, u8 command, 1326s32 i2c_smbus_read_block_data(struct i2c_client *client, u8 command,
1312 u8 *values) 1327 u8 *values)
1313{ 1328{