Lines Matching defs:input
13 #include <linux/input.h>
14 #include <linux/input/mt.h>
15 #include <linux/input/touchscreen.h>
56 struct input_dev *input;
131 input_mt_slot(data->input, slot);
132 input_mt_report_slot_state(data->input, MT_TOOL_FINGER, active);
133 touchscreen_report_pos(data->input, &data->prop, x, y, true);
136 input_mt_sync_frame(data->input);
137 input_sync(data->input);
164 mutex_lock(&data->input->mutex);
165 if (input_device_enabled(data->input))
166 nvt_ts_stop(data->input);
167 mutex_unlock(&data->input->mutex);
176 mutex_lock(&data->input->mutex);
177 if (input_device_enabled(data->input))
178 nvt_ts_start(data->input);
179 mutex_unlock(&data->input->mutex);
191 struct input_dev *input;
241 input = devm_input_allocate_device(dev);
242 if (!input)
245 input->name = client->name;
246 input->id.bustype = BUS_I2C;
247 input->open = nvt_ts_start;
248 input->close = nvt_ts_stop;
250 input_set_abs_params(input, ABS_MT_POSITION_X, 0, width - 1, 0, 0);
251 input_set_abs_params(input, ABS_MT_POSITION_Y, 0, height - 1, 0, 0);
252 touchscreen_parse_properties(input, true, &data->prop);
254 error = input_mt_init_slots(input, data->max_touches,
259 data->input = input;
260 input_set_drvdata(input, data);
271 error = input_register_device(input);
273 dev_err(dev, "failed to register input device: %d\n", error);