Lines Matching defs:client
35 static int tps6594_i2c_reg_read_with_crc(struct i2c_client *client, u8 page, u8 reg, u8 *val)
40 const u8 addr = client->addr + page;
65 ret = tps6594_i2c_transfer(client->adapter, msgs, 2);
76 static int tps6594_i2c_reg_write_with_crc(struct i2c_client *client, u8 page, u8 reg, u8 val)
81 const u8 addr = client->addr + page;
94 msg.flags = client->flags & I2C_M_TEN;
100 return tps6594_i2c_transfer(client->adapter, &msg, 1);
106 struct i2c_client *client = context;
107 struct tps6594 *tps = i2c_get_clientdata(client);
122 ret = tps6594_i2c_reg_read_with_crc(client, page, reg + i, val_bytes + i);
128 msgs[0].addr = client->addr + page;
139 return tps6594_i2c_transfer(client->adapter, msgs, 2);
144 struct i2c_client *client = context;
145 struct tps6594 *tps = i2c_get_clientdata(client);
160 ret = tps6594_i2c_reg_write_with_crc(client, page, reg + i, bytes[i + 2]);
175 msg.addr = client->addr + page;
176 msg.flags = client->flags & I2C_M_TEN;
180 ret = tps6594_i2c_transfer(client->adapter, &msg, 1);
203 static int tps6594_i2c_probe(struct i2c_client *client)
205 struct device *dev = &client->dev;
213 i2c_set_clientdata(client, tps);
216 tps->reg = client->addr;
217 tps->irq = client->irq;
219 tps->regmap = devm_regmap_init(dev, NULL, client, &tps6594_i2c_regmap_config);