Lines Matching refs:i2c
42 struct i2c_client i2c; member
57 #define i2c_to_sat(c) container_of(c, struct wf_sat, i2c)
84 err = i2c_smbus_write_word_data(&sat->i2c, 8, id << 8); in smu_sat_get_sdb_partition()
90 err = i2c_smbus_read_word_data(&sat->i2c, 9); in smu_sat_get_sdb_partition()
108 err = i2c_smbus_read_i2c_block_data(&sat->i2c, 0xa, 4, data); in smu_sat_get_sdb_partition()
141 err = i2c_smbus_read_i2c_block_data(&sat->i2c, 0x3f, 16, sat->cache); in wf_sat_read_cache()
164 if (sat->i2c.adapter == NULL) in wf_sat_get()
196 if (sat->i2c.adapter) { in wf_sat_release()
197 i2c_detach_client(&sat->i2c); in wf_sat_release()
198 sat->i2c.adapter = NULL; in wf_sat_release()
238 sat->i2c.addr = (addr >> 1) & 0x7f; in wf_sat_create()
239 sat->i2c.adapter = adapter; in wf_sat_create()
240 sat->i2c.driver = &wf_sat_driver; in wf_sat_create()
241 strncpy(sat->i2c.name, "smu-sat", I2C_NAME_SIZE-1); in wf_sat_create()
243 if (i2c_attach_client(&sat->i2c)) { in wf_sat_create()
375 sat->i2c.adapter = NULL; in wf_sat_detach()