Lines Matching defs:input
17 #include <linux/input.h>
18 #include <linux/input/mt.h>
19 #include <linux/input/touchscreen.h>
36 struct input_dev *input;
59 static void rpi_ts_poll(struct input_dev *input)
61 struct rpi_ts *ts = input_get_drvdata(input);
94 input_mt_slot(input, touchid);
95 input_mt_report_slot_state(input, MT_TOOL_FINGER, 1);
96 touchscreen_report_pos(input, &ts->prop, x, y, true);
102 input_mt_slot(input, i);
103 input_mt_report_slot_inactive(input);
108 input_mt_sync_frame(input);
109 input_sync(input);
124 struct input_dev *input;
168 input = devm_input_allocate_device(dev);
169 if (!input) {
170 dev_err(dev, "Failed to allocate input device\n");
174 ts->input = input;
175 input_set_drvdata(input, ts);
177 input->name = "raspberrypi-ts";
178 input->id.bustype = BUS_HOST;
180 input_set_abs_params(input, ABS_MT_POSITION_X, 0,
182 input_set_abs_params(input, ABS_MT_POSITION_Y, 0,
184 touchscreen_parse_properties(input, true, &ts->prop);
186 error = input_mt_init_slots(input, RPI_TS_MAX_SUPPORTED_POINTS,
193 error = input_setup_polling(input, rpi_ts_poll);
199 input_set_poll_interval(input, RPI_TS_POLL_INTERVAL);
201 error = input_register_device(input);
203 dev_err(dev, "could not register input device, %d\n", error);