Lines Matching defs:input

13 #include <linux/input.h>
14 #include <linux/input/mt.h>
245 struct input_dev *input;
248 input = devm_input_allocate_device(&data->spi->dev);
249 if (!input)
252 data->input_dev = input;
254 input_set_abs_params(input, ABS_MT_POSITION_X, 0, 9600, 0, 0);
255 input_abs_set_res(input, ABS_MT_POSITION_X, 40);
256 input_set_abs_params(input, ABS_MT_POSITION_Y, 0, 7200, 0, 0);
257 input_abs_set_res(input, ABS_MT_POSITION_Y, 48);
258 input_set_abs_params(input, ABS_MT_WIDTH_MAJOR, 0, 1024, 0, 0);
259 input_set_abs_params(input, ABS_MT_WIDTH_MINOR, 0, 1024, 0, 0);
260 input_mt_init_slots(input, 10, INPUT_MT_DIRECT);
262 input->name = "Surface3 SPI Capacitive TouchScreen";
263 input->phys = "input/ts";
264 input->id.bustype = BUS_SPI;
265 input->id.vendor = 0x045e; /* Microsoft */
266 input->id.product = 0x0001;
267 input->id.version = 0x0000;
269 error = input_register_device(input);
272 "Failed to register input device: %d", error);
281 struct input_dev *input;
284 input = devm_input_allocate_device(&data->spi->dev);
285 if (!input)
288 data->pen_input_dev = input;
291 __set_bit(INPUT_PROP_DIRECT, input->propbit);
292 __set_bit(INPUT_PROP_POINTER, input->propbit);
293 input_set_abs_params(input, ABS_X, 0, 9600, 0, 0);
294 input_abs_set_res(input, ABS_X, 40);
295 input_set_abs_params(input, ABS_Y, 0, 7200, 0, 0);
296 input_abs_set_res(input, ABS_Y, 48);
297 input_set_abs_params(input, ABS_PRESSURE, 0, 1024, 0, 0);
298 input_set_capability(input, EV_KEY, BTN_TOUCH);
299 input_set_capability(input, EV_KEY, BTN_STYLUS);
300 input_set_capability(input, EV_KEY, BTN_TOOL_PEN);
301 input_set_capability(input, EV_KEY, BTN_TOOL_RUBBER);
303 input->name = "Surface3 SPI Pen Input";
304 input->phys = "input/ts";
305 input->id.bustype = BUS_SPI;
306 input->id.vendor = 0x045e; /* Microsoft */
307 input->id.product = 0x0002;
308 input->id.version = 0x0000;
310 error = input_register_device(input);
313 "Failed to register input device: %d", error);