Lines Matching refs:i2c_client
18 struct i2c_client client;
45 i2c_set_clientdata(&state->i2c_client, state);
46 strlcpy(client->i2c_client.name, "example", I2C_NAME_SIZE);
48 ret = i2c_attach_client(&state->i2c_client);
55 dev = &state->i2c_client.dev;
64 static int example_detach(struct i2c_client *client)
123 which include the i2c_client that it will be working with:
126 + static int example_probe(struct i2c_client *client,
131 changed as the i2c_client has already been setup for use.
141 - strlcpy(client->i2c_client.name, "example", I2C_NAME_SIZE);
152 - ret = i2c_attach_client(&state->i2c_client);
160 Remove the storage of 'struct i2c_client' from the 'struct example_state'
161 as we are provided with the i2c_client in our example_probe. Instead we
165 - struct i2c_client client;
166 + struct i2c_client *client;
171 + struct device *dev = &i2c_client->dev; /* to use for dev_ reports */
176 - dev = &state->i2c_client.dev;
181 static int example_probe(struct i2c_client *i2c_client,
185 struct device *dev = &i2c_client->dev;
194 + state->client = i2c_client;
201 - static int example_detach(struct i2c_client *client)
202 + static int example_remove(struct i2c_client *client)
229 struct i2c_client *client;
233 static int example_probe(struct i2c_client *client,
255 static int example_remove(struct i2c_client *client)