Lines Matching refs:client

9 This guide outlines how to alter existing Linux 2.6 client drivers from
18 struct i2c_client client;
41 example->client.addr = addr;
42 example->client.flags = 0;
43 example->client.adapter = adap;
46 strlcpy(client->i2c_client.name, "example", I2C_NAME_SIZE);
50 dev_err(dev, "failed to attach client\n");
59 dev_info(dev, "example client created\n");
64 static int example_detach(struct i2c_client *client)
66 struct example_state *state = i2c_get_clientdata(client);
68 i2c_detach_client(client);
89 Updating the client
126 + static int example_probe(struct i2c_client *client,
133 The necessary client fields have already been setup before
134 the probe function is called, so the following client setup
137 - example->client.addr = addr;
138 - example->client.flags = 0;
139 - example->client.adapter = adap;
141 - strlcpy(client->i2c_client.name, "example", I2C_NAME_SIZE);
145 - i2c_set_clientdata(&state->client, state);
146 + i2c_set_clientdata(client, state);
154 - dev_err(dev, "failed to attach client\n");
165 - struct i2c_client client;
166 + struct i2c_client *client;
168 the new i2c client as so:
173 And remove the change after our client is attached, as the driver no
174 longer needs to register a new client structure with the core:
178 In the probe routine, ensure that the new state has the client stored
194 + state->client = i2c_client;
201 - static int example_detach(struct i2c_client *client)
202 + static int example_remove(struct i2c_client *client)
204 struct example_state *state = i2c_get_clientdata(client);
206 - i2c_detach_client(client);
229 struct i2c_client *client;
233 static int example_probe(struct i2c_client *client,
237 struct device *dev = &client->dev;
245 state->client = client;
246 i2c_set_clientdata(client, state);
250 dev_info(dev, "example client created\n");
255 static int example_remove(struct i2c_client *client)
257 struct example_state *state = i2c_get_clientdata(client);