Lines Matching refs:input_dev
86 struct input_dev *input;
96 struct input_dev *input_dev = synusb->input; in synusb_report_buttons() local
98 input_report_key(input_dev, BTN_LEFT, synusb->data[1] & 0x04); in synusb_report_buttons()
99 input_report_key(input_dev, BTN_RIGHT, synusb->data[1] & 0x01); in synusb_report_buttons()
100 input_report_key(input_dev, BTN_MIDDLE, synusb->data[1] & 0x02); in synusb_report_buttons()
105 struct input_dev *input_dev = synusb->input; in synusb_report_stick() local
114 input_report_rel(input_dev, REL_X, x); in synusb_report_stick()
115 input_report_rel(input_dev, REL_Y, -y); in synusb_report_stick()
118 input_report_abs(input_dev, ABS_PRESSURE, pressure); in synusb_report_stick()
122 input_sync(input_dev); in synusb_report_stick()
127 struct input_dev *input_dev = synusb->input; in synusb_report_touchpad() local
164 input_report_key(input_dev, BTN_TOUCH, 1); in synusb_report_touchpad()
166 input_report_key(input_dev, BTN_TOUCH, 0); in synusb_report_touchpad()
169 input_report_abs(input_dev, ABS_X, x); in synusb_report_touchpad()
170 input_report_abs(input_dev, ABS_Y, in synusb_report_touchpad()
174 input_report_abs(input_dev, ABS_PRESSURE, pressure); in synusb_report_touchpad()
175 input_report_abs(input_dev, ABS_TOOL_WIDTH, tool_width); in synusb_report_touchpad()
177 input_report_key(input_dev, BTN_TOOL_FINGER, num_fingers == 1); in synusb_report_touchpad()
178 input_report_key(input_dev, BTN_TOOL_DOUBLETAP, num_fingers == 2); in synusb_report_touchpad()
179 input_report_key(input_dev, BTN_TOOL_TRIPLETAP, num_fingers == 3); in synusb_report_touchpad()
183 input_report_key(input_dev, BTN_MIDDLE, synusb->data[1] & 0x08); in synusb_report_touchpad()
185 input_sync(input_dev); in synusb_report_touchpad()
242 static int synusb_open(struct input_dev *dev) in synusb_open()
274 static void synusb_close(struct input_dev *dev) in synusb_close()
297 struct input_dev *input_dev; in synusb_probe() local
315 input_dev = input_allocate_device(); in synusb_probe()
316 if (!synusb || !input_dev) { in synusb_probe()
323 synusb->input = input_dev; in synusb_probe()
378 input_dev->name = synusb->name; in synusb_probe()
379 input_dev->phys = synusb->phys; in synusb_probe()
380 usb_to_input_id(udev, &input_dev->id); in synusb_probe()
381 input_dev->dev.parent = &synusb->intf->dev; in synusb_probe()
384 input_dev->open = synusb_open; in synusb_probe()
385 input_dev->close = synusb_close; in synusb_probe()
388 input_set_drvdata(input_dev, synusb); in synusb_probe()
390 __set_bit(EV_ABS, input_dev->evbit); in synusb_probe()
391 __set_bit(EV_KEY, input_dev->evbit); in synusb_probe()
394 __set_bit(EV_REL, input_dev->evbit); in synusb_probe()
395 __set_bit(REL_X, input_dev->relbit); in synusb_probe()
396 __set_bit(REL_Y, input_dev->relbit); in synusb_probe()
397 __set_bit(INPUT_PROP_POINTING_STICK, input_dev->propbit); in synusb_probe()
398 input_set_abs_params(input_dev, ABS_PRESSURE, 0, 127, 0, 0); in synusb_probe()
400 input_set_abs_params(input_dev, ABS_X, in synusb_probe()
402 input_set_abs_params(input_dev, ABS_Y, in synusb_probe()
404 input_set_abs_params(input_dev, ABS_PRESSURE, 0, 255, 0, 0); in synusb_probe()
405 input_set_abs_params(input_dev, ABS_TOOL_WIDTH, 0, 15, 0, 0); in synusb_probe()
406 __set_bit(BTN_TOUCH, input_dev->keybit); in synusb_probe()
407 __set_bit(BTN_TOOL_FINGER, input_dev->keybit); in synusb_probe()
408 __set_bit(BTN_TOOL_DOUBLETAP, input_dev->keybit); in synusb_probe()
409 __set_bit(BTN_TOOL_TRIPLETAP, input_dev->keybit); in synusb_probe()
413 __set_bit(INPUT_PROP_DIRECT, input_dev->propbit); in synusb_probe()
415 __set_bit(INPUT_PROP_POINTER, input_dev->propbit); in synusb_probe()
417 __set_bit(BTN_LEFT, input_dev->keybit); in synusb_probe()
418 __set_bit(BTN_RIGHT, input_dev->keybit); in synusb_probe()
419 __set_bit(BTN_MIDDLE, input_dev->keybit); in synusb_probe()
424 error = synusb_open(input_dev); in synusb_probe()
429 error = input_register_device(input_dev); in synusb_probe()
448 input_free_device(input_dev); in synusb_probe()