Lines Matching refs:ts

108 static void pixcir_ts_report(struct pixcir_i2c_ts_data *ts,  in pixcir_ts_report()  argument
115 struct device *dev = &ts->client->dev; in pixcir_ts_report()
116 const struct pixcir_i2c_chip_data *chip = &ts->pdata->chip; in pixcir_ts_report()
129 input_mt_assign_slots(ts->input, slots, pos, n, 0); in pixcir_ts_report()
136 slot = input_mt_get_slot_by_key(ts->input, touch->id); in pixcir_ts_report()
146 input_mt_slot(ts->input, slot); in pixcir_ts_report()
147 input_mt_report_slot_state(ts->input, in pixcir_ts_report()
150 input_event(ts->input, EV_ABS, ABS_MT_POSITION_X, touch->x); in pixcir_ts_report()
151 input_event(ts->input, EV_ABS, ABS_MT_POSITION_Y, touch->y); in pixcir_ts_report()
157 input_mt_sync_frame(ts->input); in pixcir_ts_report()
158 input_sync(ts->input); in pixcir_ts_report()
192 static int pixcir_set_power_mode(struct pixcir_i2c_ts_data *ts, in pixcir_set_power_mode() argument
195 struct device *dev = &ts->client->dev; in pixcir_set_power_mode()
198 ret = i2c_smbus_read_byte_data(ts->client, PIXCIR_REG_POWER_MODE); in pixcir_set_power_mode()
211 ret = i2c_smbus_write_byte_data(ts->client, PIXCIR_REG_POWER_MODE, ret); in pixcir_set_power_mode()
226 static int pixcir_set_int_mode(struct pixcir_i2c_ts_data *ts, in pixcir_set_int_mode() argument
229 struct device *dev = &ts->client->dev; in pixcir_set_int_mode()
232 ret = i2c_smbus_read_byte_data(ts->client, PIXCIR_REG_INT_MODE); in pixcir_set_int_mode()
247 ret = i2c_smbus_write_byte_data(ts->client, PIXCIR_REG_INT_MODE, ret); in pixcir_set_int_mode()
260 static int pixcir_int_enable(struct pixcir_i2c_ts_data *ts, bool enable) in pixcir_int_enable() argument
262 struct device *dev = &ts->client->dev; in pixcir_int_enable()
265 ret = i2c_smbus_read_byte_data(ts->client, PIXCIR_REG_INT_MODE); in pixcir_int_enable()
277 ret = i2c_smbus_write_byte_data(ts->client, PIXCIR_REG_INT_MODE, ret); in pixcir_int_enable()
287 static int pixcir_start(struct pixcir_i2c_ts_data *ts) in pixcir_start() argument
289 struct device *dev = &ts->client->dev; in pixcir_start()
293 error = pixcir_set_int_mode(ts, PIXCIR_INT_LEVEL_TOUCH, 0); in pixcir_start()
299 ts->running = true; in pixcir_start()
303 error = pixcir_int_enable(ts, true); in pixcir_start()
313 static int pixcir_stop(struct pixcir_i2c_ts_data *ts) in pixcir_stop() argument
318 error = pixcir_int_enable(ts, false); in pixcir_stop()
320 dev_err(&ts->client->dev, in pixcir_stop()
327 ts->running = false; in pixcir_stop()
331 synchronize_irq(ts->client->irq); in pixcir_stop()
338 struct pixcir_i2c_ts_data *ts = input_get_drvdata(dev); in pixcir_input_open() local
340 return pixcir_start(ts); in pixcir_input_open()
345 struct pixcir_i2c_ts_data *ts = input_get_drvdata(dev); in pixcir_input_close() local
347 pixcir_stop(ts); in pixcir_input_close()
353 struct pixcir_i2c_ts_data *ts = i2c_get_clientdata(client); in pixcir_i2c_ts_suspend() local
354 struct input_dev *input = ts->input; in pixcir_i2c_ts_suspend()
361 ret = pixcir_start(ts); in pixcir_i2c_ts_suspend()
370 ret = pixcir_stop(ts); in pixcir_i2c_ts_suspend()
382 struct pixcir_i2c_ts_data *ts = i2c_get_clientdata(client); in pixcir_i2c_ts_resume() local
383 struct input_dev *input = ts->input; in pixcir_i2c_ts_resume()
392 ret = pixcir_stop(ts); in pixcir_i2c_ts_resume()
399 ret = pixcir_start(ts); in pixcir_i2c_ts_resume()