Lines Matching defs:input
13 #include <linux/input.h>
21 #include <linux/input/mt.h>
180 struct input_dev *input;
952 static void wdt87xx_report_contact(struct input_dev *input,
982 dev_dbg(input->dev.parent, "tip on (%d), x(%d), y(%d)\n",
985 input_mt_slot(input, finger_id);
986 input_mt_report_slot_state(input, MT_TOOL_FINGER, 1);
987 input_report_abs(input, ABS_MT_TOUCH_MAJOR, w);
988 input_report_abs(input, ABS_MT_PRESSURE, p);
989 input_report_abs(input, ABS_MT_POSITION_X, x);
990 input_report_abs(input, ABS_MT_POSITION_Y, y);
1012 wdt87xx_report_contact(wdt->input,
1017 input_mt_sync_frame(wdt->input);
1018 input_sync(wdt->input);
1027 struct input_dev *input;
1031 input = devm_input_allocate_device(dev);
1032 if (!input) {
1033 dev_err(dev, "failed to allocate input device\n");
1036 wdt->input = input;
1038 input->name = "WDT87xx Touchscreen";
1039 input->id.bustype = BUS_I2C;
1040 input->id.vendor = wdt->param.vendor_id;
1041 input->id.product = wdt->param.product_id;
1042 input->phys = wdt->phys;
1044 input_set_abs_params(input, ABS_MT_POSITION_X, 0,
1046 input_set_abs_params(input, ABS_MT_POSITION_Y, 0,
1048 input_abs_set_res(input, ABS_MT_POSITION_X, res);
1049 input_abs_set_res(input, ABS_MT_POSITION_Y, res);
1051 input_set_abs_params(input, ABS_MT_TOUCH_MAJOR,
1053 input_set_abs_params(input, ABS_MT_PRESSURE, 0, 0xFF, 0, 0);
1055 input_mt_init_slots(input, WDT_MAX_FINGER,
1058 error = input_register_device(input);
1060 dev_err(dev, "failed to register input device: %d\n", error);