Lines Matching defs:input

13 #include <linux/input.h>
14 #include <linux/input/mt.h>
254 struct input_dev *input;
257 input = devm_input_allocate_device(&data->spi->dev);
258 if (!input)
261 data->input_dev = input;
263 input_set_abs_params(input, ABS_MT_POSITION_X, 0, 9600, 0, 0);
264 input_abs_set_res(input, ABS_MT_POSITION_X, 40);
265 input_set_abs_params(input, ABS_MT_POSITION_Y, 0, 7200, 0, 0);
266 input_abs_set_res(input, ABS_MT_POSITION_Y, 48);
267 input_set_abs_params(input, ABS_MT_WIDTH_MAJOR, 0, 1024, 0, 0);
268 input_set_abs_params(input, ABS_MT_WIDTH_MINOR, 0, 1024, 0, 0);
269 input_mt_init_slots(input, 10, INPUT_MT_DIRECT);
271 input->name = "Surface3 SPI Capacitive TouchScreen";
272 input->phys = "input/ts";
273 input->id.bustype = BUS_SPI;
274 input->id.vendor = 0x045e; /* Microsoft */
275 input->id.product = 0x0001;
276 input->id.version = 0x0000;
278 error = input_register_device(input);
281 "Failed to register input device: %d", error);
290 struct input_dev *input;
293 input = devm_input_allocate_device(&data->spi->dev);
294 if (!input)
297 data->pen_input_dev = input;
300 __set_bit(INPUT_PROP_DIRECT, input->propbit);
301 __set_bit(INPUT_PROP_POINTER, input->propbit);
302 input_set_abs_params(input, ABS_X, 0, 9600, 0, 0);
303 input_abs_set_res(input, ABS_X, 40);
304 input_set_abs_params(input, ABS_Y, 0, 7200, 0, 0);
305 input_abs_set_res(input, ABS_Y, 48);
306 input_set_abs_params(input, ABS_PRESSURE, 0, 1024, 0, 0);
307 input_set_capability(input, EV_KEY, BTN_TOUCH);
308 input_set_capability(input, EV_KEY, BTN_STYLUS);
309 input_set_capability(input, EV_KEY, BTN_TOOL_PEN);
310 input_set_capability(input, EV_KEY, BTN_TOOL_RUBBER);
312 input->name = "Surface3 SPI Pen Input";
313 input->phys = "input/ts";
314 input->id.bustype = BUS_SPI;
315 input->id.vendor = 0x045e; /* Microsoft */
316 input->id.product = 0x0002;
317 input->id.version = 0x0000;
319 error = input_register_device(input);
322 "Failed to register input device: %d", error);