Lines Matching defs:input
19 #include <linux/input.h>
20 #include <linux/input/mt.h>
21 #include <linux/input/touchscreen.h>
69 struct input_dev *input;
90 data->input = devm_input_allocate_device(dev);
91 if (!data->input) {
93 "Failed to allocate input device\n");
97 input_set_abs_params(data->input, ABS_MT_POSITION_X, 0, 4095, 0, 0);
98 input_set_abs_params(data->input, ABS_MT_POSITION_Y, 0, 4095, 0, 0);
99 touchscreen_parse_properties(data->input, true, &data->prop);
101 input_mt_init_slots(data->input, data->max_fingers,
106 input_set_capability(data->input, EV_KEY, KEY_LEFTMETA);
108 data->input->name = SILEAD_TS_NAME;
109 data->input->phys = "input/ts";
110 data->input->id.bustype = BUS_I2C;
112 error = input_register_device(data->input);
114 dev_err(dev, "Failed to register input device: %d\n", error);
135 struct input_dev *input = data->input;
184 input_mt_assign_slots(input, data->slots, data->pos, touch_nr, 0);
187 input_mt_slot(input, data->slots[i]);
188 input_mt_report_slot_state(input, MT_TOOL_FINGER, true);
189 input_report_abs(input, ABS_MT_POSITION_X, data->pos[i].x);
190 input_report_abs(input, ABS_MT_POSITION_Y, data->pos[i].y);
196 input_mt_sync_frame(input);
197 input_report_key(input, KEY_LEFTMETA, softbutton_pressed);
198 input_sync(input);