aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/i2c.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/i2c.h')
-rw-r--r--include/linux/i2c.h27
1 files changed, 15 insertions, 12 deletions
diff --git a/include/linux/i2c.h b/include/linux/i2c.h
index 56cfe23ffb39..903576df88dc 100644
--- a/include/linux/i2c.h
+++ b/include/linux/i2c.h
@@ -57,9 +57,10 @@ struct i2c_board_info;
57 * transmit an arbitrary number of messages without interruption. 57 * transmit an arbitrary number of messages without interruption.
58 * @count must be be less than 64k since msg.len is u16. 58 * @count must be be less than 64k since msg.len is u16.
59 */ 59 */
60extern int i2c_master_send(struct i2c_client *client, const char *buf, 60extern int i2c_master_send(const struct i2c_client *client, const char *buf,
61 int count);
62extern int i2c_master_recv(const struct i2c_client *client, char *buf,
61 int count); 63 int count);
62extern int i2c_master_recv(struct i2c_client *client, char *buf, int count);
63 64
64/* Transfer num messages. 65/* Transfer num messages.
65 */ 66 */
@@ -78,23 +79,25 @@ extern s32 i2c_smbus_xfer(struct i2c_adapter *adapter, u16 addr,
78/* Now follow the 'nice' access routines. These also document the calling 79/* Now follow the 'nice' access routines. These also document the calling
79 conventions of i2c_smbus_xfer. */ 80 conventions of i2c_smbus_xfer. */
80 81
81extern s32 i2c_smbus_read_byte(struct i2c_client *client); 82extern s32 i2c_smbus_read_byte(const struct i2c_client *client);
82extern s32 i2c_smbus_write_byte(struct i2c_client *client, u8 value); 83extern s32 i2c_smbus_write_byte(const struct i2c_client *client, u8 value);
83extern s32 i2c_smbus_read_byte_data(struct i2c_client *client, u8 command); 84extern s32 i2c_smbus_read_byte_data(const struct i2c_client *client,
84extern s32 i2c_smbus_write_byte_data(struct i2c_client *client, 85 u8 command);
86extern s32 i2c_smbus_write_byte_data(const struct i2c_client *client,
85 u8 command, u8 value); 87 u8 command, u8 value);
86extern s32 i2c_smbus_read_word_data(struct i2c_client *client, u8 command); 88extern s32 i2c_smbus_read_word_data(const struct i2c_client *client,
87extern s32 i2c_smbus_write_word_data(struct i2c_client *client, 89 u8 command);
90extern s32 i2c_smbus_write_word_data(const struct i2c_client *client,
88 u8 command, u16 value); 91 u8 command, u16 value);
89/* Returns the number of read bytes */ 92/* Returns the number of read bytes */
90extern s32 i2c_smbus_read_block_data(struct i2c_client *client, 93extern s32 i2c_smbus_read_block_data(const struct i2c_client *client,
91 u8 command, u8 *values); 94 u8 command, u8 *values);
92extern s32 i2c_smbus_write_block_data(struct i2c_client *client, 95extern s32 i2c_smbus_write_block_data(const struct i2c_client *client,
93 u8 command, u8 length, const u8 *values); 96 u8 command, u8 length, const u8 *values);
94/* Returns the number of read bytes */ 97/* Returns the number of read bytes */
95extern s32 i2c_smbus_read_i2c_block_data(struct i2c_client *client, 98extern s32 i2c_smbus_read_i2c_block_data(const struct i2c_client *client,
96 u8 command, u8 length, u8 *values); 99 u8 command, u8 length, u8 *values);
97extern s32 i2c_smbus_write_i2c_block_data(struct i2c_client *client, 100extern s32 i2c_smbus_write_i2c_block_data(const struct i2c_client *client,
98 u8 command, u8 length, 101 u8 command, u8 length,
99 const u8 *values); 102 const u8 *values);
100#endif /* I2C */ 103#endif /* I2C */