Lines Matching refs:c2a
104 struct i2c_atr_alias_pair *c2a; in i2c_atr_find_mapping_by_client() local
106 list_for_each_entry(c2a, list, node) { in i2c_atr_find_mapping_by_client()
107 if (c2a->client == client) in i2c_atr_find_mapping_by_client()
108 return c2a; in i2c_atr_find_mapping_by_client()
117 struct i2c_atr_alias_pair *c2a; in i2c_atr_find_mapping_by_addr() local
119 list_for_each_entry(c2a, list, node) { in i2c_atr_find_mapping_by_addr()
120 if (c2a->client->addr == phys_addr) in i2c_atr_find_mapping_by_addr()
121 return c2a; in i2c_atr_find_mapping_by_addr()
138 static struct i2c_atr_alias_pair *c2a; in i2c_atr_map_msgs() local
158 c2a = i2c_atr_find_mapping_by_addr(&chan->alias_list, in i2c_atr_map_msgs()
160 if (!c2a) { in i2c_atr_map_msgs()
170 msgs[i].addr = c2a->alias; in i2c_atr_map_msgs()
226 struct i2c_atr_alias_pair *c2a; in i2c_atr_smbus_xfer() local
228 c2a = i2c_atr_find_mapping_by_addr(&chan->alias_list, addr); in i2c_atr_smbus_xfer()
229 if (!c2a) { in i2c_atr_smbus_xfer()
234 return i2c_smbus_xfer(parent, c2a->alias, flags, read_write, command, in i2c_atr_smbus_xfer()
321 struct i2c_atr_alias_pair *c2a; in i2c_atr_attach_client() local
331 c2a = kzalloc(sizeof(*c2a), GFP_KERNEL); in i2c_atr_attach_client()
332 if (!c2a) { in i2c_atr_attach_client()
344 c2a->client = client; in i2c_atr_attach_client()
345 c2a->alias = alias; in i2c_atr_attach_client()
346 list_add(&c2a->node, &chan->alias_list); in i2c_atr_attach_client()
351 kfree(c2a); in i2c_atr_attach_client()
363 struct i2c_atr_alias_pair *c2a; in i2c_atr_detach_client() local
367 c2a = i2c_atr_find_mapping_by_client(&chan->alias_list, client); in i2c_atr_detach_client()
368 if (!c2a) { in i2c_atr_detach_client()
374 i2c_atr_release_alias(atr, c2a->alias); in i2c_atr_detach_client()
378 chan->chan_id, client->addr, c2a->alias, client->name); in i2c_atr_detach_client()
380 list_del(&c2a->node); in i2c_atr_detach_client()
381 kfree(c2a); in i2c_atr_detach_client()