Lines Matching refs:client

51 	struct i2c_client *client;  member
61 struct i2c_client *client = ts->client; in st1232_ts_read_data() local
68 msg[0].addr = client->addr; in st1232_ts_read_data()
74 msg[1].addr = ts->client->addr; in st1232_ts_read_data()
79 error = i2c_transfer(client->adapter, msg, 2); in st1232_ts_read_data()
136 dev_pm_qos_add_ancestor_request(&ts->client->dev, in st1232_ts_irq_handler()
154 static int st1232_ts_probe(struct i2c_client *client, in st1232_ts_probe() argument
158 struct st1232_pdata *pdata = dev_get_platdata(&client->dev); in st1232_ts_probe()
162 if (!i2c_check_functionality(client->adapter, I2C_FUNC_I2C)) { in st1232_ts_probe()
163 dev_err(&client->dev, "need I2C_FUNC_I2C\n"); in st1232_ts_probe()
167 if (!client->irq) { in st1232_ts_probe()
168 dev_err(&client->dev, "no IRQ?\n"); in st1232_ts_probe()
172 ts = devm_kzalloc(&client->dev, sizeof(*ts), GFP_KERNEL); in st1232_ts_probe()
176 input_dev = devm_input_allocate_device(&client->dev); in st1232_ts_probe()
180 ts->client = client; in st1232_ts_probe()
185 else if (client->dev.of_node) in st1232_ts_probe()
186 ts->reset_gpio = of_get_gpio(client->dev.of_node, 0); in st1232_ts_probe()
191 error = devm_gpio_request(&client->dev, ts->reset_gpio, NULL); in st1232_ts_probe()
193 dev_err(&client->dev, in st1232_ts_probe()
204 input_dev->dev.parent = &client->dev; in st1232_ts_probe()
214 error = devm_request_threaded_irq(&client->dev, client->irq, in st1232_ts_probe()
217 client->name, ts); in st1232_ts_probe()
219 dev_err(&client->dev, "Failed to register interrupt\n"); in st1232_ts_probe()
225 dev_err(&client->dev, "Unable to register %s input device\n", in st1232_ts_probe()
230 i2c_set_clientdata(client, ts); in st1232_ts_probe()
231 device_init_wakeup(&client->dev, 1); in st1232_ts_probe()
236 static int st1232_ts_remove(struct i2c_client *client) in st1232_ts_remove() argument
238 struct st1232_ts_data *ts = i2c_get_clientdata(client); in st1232_ts_remove()
240 device_init_wakeup(&client->dev, 0); in st1232_ts_remove()
248 struct i2c_client *client = to_i2c_client(dev); in st1232_ts_suspend() local
249 struct st1232_ts_data *ts = i2c_get_clientdata(client); in st1232_ts_suspend()
251 if (device_may_wakeup(&client->dev)) { in st1232_ts_suspend()
252 enable_irq_wake(client->irq); in st1232_ts_suspend()
254 disable_irq(client->irq); in st1232_ts_suspend()
263 struct i2c_client *client = to_i2c_client(dev); in st1232_ts_resume() local
264 struct st1232_ts_data *ts = i2c_get_clientdata(client); in st1232_ts_resume()
266 if (device_may_wakeup(&client->dev)) { in st1232_ts_resume()
267 disable_irq_wake(client->irq); in st1232_ts_resume()
270 enable_irq(client->irq); in st1232_ts_resume()