Lines Matching refs:ts_data
58 static int surface3_spi_read(struct surface3_ts_data *ts_data) in surface3_spi_read() argument
60 struct spi_device *spi = ts_data->spi; in surface3_spi_read()
62 memset(ts_data->rd_buf, 0, sizeof(ts_data->rd_buf)); in surface3_spi_read()
63 return spi_read(spi, ts_data->rd_buf, sizeof(ts_data->rd_buf)); in surface3_spi_read()
66 static void surface3_spi_report_touch(struct surface3_ts_data *ts_data, in surface3_spi_report_touch() argument
72 slot = input_mt_get_slot_by_key(ts_data->input_dev, in surface3_spi_report_touch()
77 input_mt_slot(ts_data->input_dev, slot); in surface3_spi_report_touch()
78 input_mt_report_slot_state(ts_data->input_dev, MT_TOOL_FINGER, st); in surface3_spi_report_touch()
80 input_report_abs(ts_data->input_dev, in surface3_spi_report_touch()
83 input_report_abs(ts_data->input_dev, in surface3_spi_report_touch()
86 input_report_abs(ts_data->input_dev, in surface3_spi_report_touch()
89 input_report_abs(ts_data->input_dev, in surface3_spi_report_touch()
95 static void surface3_spi_process_touch(struct surface3_ts_data *ts_data, u8 *data) in surface3_spi_process_touch() argument
114 surface3_spi_report_touch(ts_data, finger); in surface3_spi_process_touch()
117 input_mt_sync_frame(ts_data->input_dev); in surface3_spi_process_touch()
118 input_sync(ts_data->input_dev); in surface3_spi_process_touch()
121 static void surface3_spi_report_pen(struct surface3_ts_data *ts_data, in surface3_spi_report_pen() argument
124 struct input_dev *dev = ts_data->pen_input_dev; in surface3_spi_report_pen()
131 if (ts_data->pen_tool != tool) { in surface3_spi_report_pen()
132 input_report_key(dev, ts_data->pen_tool, 0); in surface3_spi_report_pen()
134 ts_data->pen_tool = tool; in surface3_spi_report_pen()
139 input_report_key(dev, ts_data->pen_tool, prox); in surface3_spi_report_pen()
158 static void surface3_spi_process_pen(struct surface3_ts_data *ts_data, u8 *data) in surface3_spi_process_pen() argument
164 surface3_spi_report_pen(ts_data, pen); in surface3_spi_process_pen()
165 input_sync(ts_data->pen_input_dev); in surface3_spi_process_pen()
168 static void surface3_spi_process(struct surface3_ts_data *ts_data) in surface3_spi_process() argument
173 u8 *data = ts_data->rd_buf; in surface3_spi_process()
176 dev_err(&ts_data->spi->dev, in surface3_spi_process()
182 surface3_spi_process_touch(ts_data, data); in surface3_spi_process()
185 surface3_spi_process_pen(ts_data, data); in surface3_spi_process()
188 dev_err(&ts_data->spi->dev, in surface3_spi_process()