Lines Matching defs:client

39 typedef int (*i2c_slave_cb_t)(struct i2c_client *client, enum i2c_slave_event event, u8 *val);
60 int i2c_transfer_buffer_flags(const struct i2c_client *client, char *buf, int count, u16 flags);
64 * @client: Handle to slave device
70 static inline int i2c_master_recv(const struct i2c_client *client, char *buf, int count)
72 return i2c_transfer_buffer_flags(client, buf, count, I2C_M_RD);
78 * @client: Handle to slave device
84 static inline int i2c_master_recv_dmasafe(const struct i2c_client *client, char *buf, int count)
86 return i2c_transfer_buffer_flags(client, buf, count, I2C_M_RD | I2C_M_DMA_SAFE);
91 * @client: Handle to slave device
97 static inline int i2c_master_send(const struct i2c_client *client, const char *buf, int count)
99 return i2c_transfer_buffer_flags(client, (char *)buf, count, 0);
105 * @client: Handle to slave device
111 static inline int i2c_master_send_dmasafe(const struct i2c_client *client, const char *buf, int count)
113 return i2c_transfer_buffer_flags(client, (char *)buf, count, I2C_M_DMA_SAFE);
137 s32 i2c_smbus_read_byte(const struct i2c_client *client);
138 s32 i2c_smbus_write_byte(const struct i2c_client *client, u8 value);
139 s32 i2c_smbus_read_byte_data(const struct i2c_client *client, u8 command);
140 s32 i2c_smbus_write_byte_data(const struct i2c_client *client, u8 command, u8 value);
141 s32 i2c_smbus_read_word_data(const struct i2c_client *client, u8 command);
142 s32 i2c_smbus_write_word_data(const struct i2c_client *client, u8 command, u16 value);
144 static inline s32 i2c_smbus_read_word_swapped(const struct i2c_client *client, u8 command)
146 s32 value = i2c_smbus_read_word_data(client, command);
151 static inline s32 i2c_smbus_write_word_swapped(const struct i2c_client *client, u8 command, u16 value)
153 return i2c_smbus_write_word_data(client, command, swab16(value));
157 s32 i2c_smbus_read_block_data(const struct i2c_client *client, u8 command, u8 *values);
158 s32 i2c_smbus_write_block_data(const struct i2c_client *client, u8 command, u8 length, const u8 *values);
160 s32 i2c_smbus_read_i2c_block_data(const struct i2c_client *client, u8 command, u8 length, u8 *values);
161 s32 i2c_smbus_write_i2c_block_data(const struct i2c_client *client, u8 command, u8 length, const u8 *values);
162 s32 i2c_smbus_read_i2c_block_data_or_emulated(const struct i2c_client *client, u8 command, u8 length, u8 *values);
163 int i2c_get_device_id(const struct i2c_client *client, struct i2c_device_identity *id);
167 * struct i2c_device_identity - i2c client device identification
237 int (*probe)(struct i2c_client *client, const struct i2c_device_id *id);
238 int (*remove)(struct i2c_client *client);
243 int (*probe_new)(struct i2c_client *client);
246 void (*shutdown)(struct i2c_client *client);
255 void (*alert)(struct i2c_client *client, enum i2c_alert_protocol protocol, unsigned int data);
260 int (*command)(struct i2c_client *client, unsigned int cmd, void *arg);
266 int (*detect)(struct i2c_client *client, struct i2c_board_info *info);
319 const struct i2c_device_id *i2c_match_id(const struct i2c_device_id *id, const struct i2c_client *client);
327 static inline void *i2c_get_clientdata(const struct i2c_client *client)
329 return dev_get_drvdata(&client->dev);
332 static inline void i2c_set_clientdata(struct i2c_client *client, void *data)
334 dev_set_drvdata(&client->dev, data);
348 int i2c_slave_register(struct i2c_client *client, i2c_slave_cb_t slave_cb);
349 int i2c_slave_unregister(struct i2c_client *client);
352 static inline int i2c_slave_event(struct i2c_client *client, enum i2c_slave_event event, u8 *val)
354 return client->slave_cb(client, event, val);
439 struct i2c_client *i2c_new_ancillary_device(struct i2c_client *client, const char *name, u16 default_addr);
441 void i2c_unregister_device(struct i2c_client *client);
471 * @reg_slave: Register given client to I2C slave mode of this adapter
472 * @unreg_slave: Unregister given client from I2C slave mode of this adapter
504 int (*reg_slave)(struct i2c_client *client);
505 int (*unreg_slave)(struct i2c_client *client);
812 static inline bool i2c_client_has_driver(struct i2c_client *client)
814 return !IS_ERR_OR_NULL(client) && client->dev.driver;
901 const struct of_device_id *i2c_of_match_device(const struct of_device_id *matches, struct i2c_client *client);
923 struct i2c_client *client)