Lines Matching refs:client

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