diff options
author | David Brownell <david-b@pacbell.net> | 2007-10-13 21:56:31 (GMT) |
---|---|---|
committer | Jean Delvare <khali@hyperion.delvare> | 2007-10-13 21:56:31 (GMT) |
commit | a64ec07d3daeb7cdd363e66ed5929beacdd94652 (patch) | |
tree | 2b787bd509ba42c3ffeeaf84cedd0ca49ae1d6cb /drivers/i2c/i2c-core.c | |
parent | 553515e5c54dbf3340cd6773aaf0acb53291d6ad (diff) | |
download | linux-fsl-qoriq-a64ec07d3daeb7cdd363e66ed5929beacdd94652.tar.xz |
i2c: Document struct i2c_msg
Clarify use of the I2C_M_* flags by highlighting the fact that
most of them depend on I2C_FUNC_PROTOCOL_MANGLING.
Also provide kerneldoc for i2c_smbus_read_block_data() and also
for "struct i2c_msg".
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Diffstat (limited to 'drivers/i2c/i2c-core.c')
-rw-r--r-- | drivers/i2c/i2c-core.c | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/drivers/i2c/i2c-core.c b/drivers/i2c/i2c-core.c index f95b1b6..5e58b56 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) } EXPORT_SYMBOL(i2c_smbus_write_word_data); -/* Returns the number of read bytes */ +/** + * i2c_smbus_read_block_data - SMBus block read request + * @client: Handle to slave device + * @command: Command byte issued to let the slave know what data should + * be returned + * @values: Byte array into which data will be read; big enough to hold + * the data returned by the slave. SMBus allows at most 32 bytes. + * + * Returns the number of bytes read in the slave's response, else a + * negative number to indicate some kind of error. + * + * Note that using this function requires that the client's adapter support + * the I2C_FUNC_SMBUS_READ_BLOCK_DATA functionality. Not all adapter drivers + * support this; its emulation through I2C messaging relies on a specific + * mechanism (I2C_M_RECV_LEN) which may not be implemented. + */ s32 i2c_smbus_read_block_data(struct i2c_client *client, u8 command, u8 *values) { |