Lines Matching defs:input
4 * This is a generic input driver that connects to an ADC
5 * given the channels in device tree, and reports events to the input
12 #include <linux/input.h>
13 #include <linux/input/touchscreen.h>
31 * @input: the input device structure that we register
39 struct input_dev *input;
57 input_report_key(st->input, BTN_TOUCH, 0);
58 input_sync(st->input);
63 touchscreen_report_pos(st->input, &st->prop, x, y, false);
65 input_report_abs(st->input, ABS_PRESSURE, press);
66 input_report_key(st->input, BTN_TOUCH, 1);
67 input_sync(st->input);
100 struct input_dev *input;
136 input = devm_input_allocate_device(dev);
137 if (!input) {
138 dev_err(dev, "failed to allocate input device.\n");
142 input->name = DRIVER_NAME;
143 input->id.bustype = BUS_HOST;
144 input->open = grts_open;
145 input->close = grts_close;
147 input_set_abs_params(input, ABS_X, 0, GRTS_MAX_POS_MASK - 1, 0, 0);
148 input_set_abs_params(input, ABS_Y, 0, GRTS_MAX_POS_MASK - 1, 0, 0);
150 input_set_abs_params(input, ABS_PRESSURE, st->pressure_min,
153 input_set_capability(input, EV_KEY, BTN_TOUCH);
156 touchscreen_parse_properties(input, false, &st->prop);
158 st->input = input;
159 input_set_drvdata(input, st);
161 error = input_register_device(input);
163 dev_err(dev, "failed to register input device.");