Lines Matching refs:client

74 static int i2cr_transfer(struct i2c_client *client, u32 command, u64 *data)
79 msgs[0].addr = client->addr;
83 msgs[1].addr = client->addr;
88 ret = i2c_transfer(client->adapter, msgs, 2);
92 trace_i2cr_i2c_error(client, command, ret);
100 static int i2cr_check_status(struct i2c_client *client)
105 ret = i2cr_transfer(client, I2CR_STATUS_CMD, &status);
114 i2cr_transfer(client, I2CR_ERROR_CMD, &error);
115 i2cr_transfer(client, I2CR_LOG_CMD, &log);
117 trace_i2cr_status_error(client, status, error, log);
120 i2c_master_send(client, (const char *)buf, sizeof(buf));
123 i2c_master_send(client, (const char *)buf, sizeof(buf));
126 i2c_master_send(client, (const char *)buf, sizeof(buf));
128 dev_err(&client->dev, "status:%016llx error:%016llx log:%016llx\n", status, error,
133 trace_i2cr_status(client, status);
144 ret = i2cr_transfer(i2cr->client, command, data);
148 ret = i2cr_check_status(i2cr->client);
152 trace_i2cr_read(i2cr->client, command, data);
170 ret = i2c_master_send(i2cr->client, (const char *)buf, sizeof(buf));
172 ret = i2cr_check_status(i2cr->client);
174 trace_i2cr_write(i2cr->client, buf[0], data);
176 trace_i2cr_i2c_error(i2cr->client, buf[0], ret);
259 static int i2cr_probe(struct i2c_client *client)
269 i2cr->master.idx = client->adapter->nr;
271 i2cr->master.dev.parent = &client->dev;
272 i2cr->master.dev.of_node = of_node_get(dev_of_node(&client->dev));
280 i2cr->client = client;
286 i2c_set_clientdata(client, i2cr);
290 static void i2cr_remove(struct i2c_client *client)
292 struct fsi_master_i2cr *i2cr = i2c_get_clientdata(client);