Lines Matching refs:dev2

216 static void alps_report_buttons(struct input_dev *dev1, struct input_dev *dev2,  in alps_report_buttons()  argument
226 dev = (dev2 && test_bit(BTN_LEFT, dev2->key)) ? dev2 : dev1; in alps_report_buttons()
229 dev = (dev2 && test_bit(BTN_RIGHT, dev2->key)) ? dev2 : dev1; in alps_report_buttons()
232 dev = (dev2 && test_bit(BTN_MIDDLE, dev2->key)) ? dev2 : dev1; in alps_report_buttons()
239 if (dev2) in alps_report_buttons()
240 input_sync(dev2); in alps_report_buttons()
248 struct input_dev *dev2 = priv->dev2; in alps_process_packet_v1_v2() local
284 input_report_rel(dev2, REL_X, (x > 383 ? (x - 768) : x)); in alps_process_packet_v1_v2()
285 input_report_rel(dev2, REL_Y, -(y > 255 ? (y - 512) : y)); in alps_process_packet_v1_v2()
287 alps_report_buttons(dev2, dev, left, right, middle); in alps_process_packet_v1_v2()
289 input_sync(dev2); in alps_process_packet_v1_v2()
300 alps_report_buttons(dev, dev2, left, right, middle); in alps_process_packet_v1_v2()
545 struct input_dev *dev = priv->dev2; in alps_process_trackstick_packet_v3()
698 struct input_dev *dev2 = priv->dev2; in alps_process_touchpad_packet_v3_v5() local
782 input_report_key(dev2, BTN_LEFT, f->ts_left); in alps_process_touchpad_packet_v3_v5()
783 input_report_key(dev2, BTN_RIGHT, f->ts_right); in alps_process_touchpad_packet_v3_v5()
784 input_report_key(dev2, BTN_MIDDLE, f->ts_middle); in alps_process_touchpad_packet_v3_v5()
785 input_sync(dev2); in alps_process_touchpad_packet_v3_v5()
814 struct input_dev *dev2 = priv->dev2; in alps_process_packet_v6() local
844 input_report_rel(dev2, REL_X, (char)x / 4); in alps_process_packet_v6()
845 input_report_rel(dev2, REL_Y, -((char)y / 4)); in alps_process_packet_v6()
847 input_report_key(dev2, BTN_LEFT, left); in alps_process_packet_v6()
848 input_report_key(dev2, BTN_RIGHT, right); in alps_process_packet_v6()
849 input_report_key(dev2, BTN_MIDDLE, middle); in alps_process_packet_v6()
851 input_sync(dev2); in alps_process_packet_v6()
1085 struct input_dev *dev2 = priv->dev2; in alps_process_trackstick_packet_v7() local
1104 input_report_rel(dev2, REL_X, (char)x); in alps_process_trackstick_packet_v7()
1105 input_report_rel(dev2, REL_Y, -((char)y)); in alps_process_trackstick_packet_v7()
1107 input_report_key(dev2, BTN_LEFT, left); in alps_process_trackstick_packet_v7()
1108 input_report_key(dev2, BTN_RIGHT, right); in alps_process_trackstick_packet_v7()
1109 input_report_key(dev2, BTN_MIDDLE, middle); in alps_process_trackstick_packet_v7()
1111 input_sync(dev2); in alps_process_trackstick_packet_v7()
1340 (priv->dev2 ? "input2" : "input1")); in alps_register_bare_ps2_mouse()
1390 struct input_dev *dev, *dev2 = NULL; in alps_report_bare_ps2_packet() local
1396 dev = priv->dev2; in alps_report_bare_ps2_packet()
1397 dev2 = psmouse->dev; in alps_report_bare_ps2_packet()
1409 alps_report_buttons(dev, dev2, in alps_report_bare_ps2_packet()
2792 if (priv->dev2) in alps_disconnect()
2793 input_unregister_device(priv->dev2); in alps_disconnect()
2910 struct input_dev *dev2; in alps_init() local
2912 dev2 = input_allocate_device(); in alps_init()
2913 if (!dev2) { in alps_init()
2922 dev2->phys = priv->phys2; in alps_init()
2928 dev2->name = "AlpsPS/2 ALPS DualPoint Stick"; in alps_init()
2930 dev2->id.bustype = BUS_I8042; in alps_init()
2931 dev2->id.vendor = 0x0002; in alps_init()
2932 dev2->id.product = PSMOUSE_ALPS; in alps_init()
2933 dev2->id.version = priv->proto_version; in alps_init()
2934 dev2->dev.parent = &psmouse->ps2dev.serio->dev; in alps_init()
2936 input_set_capability(dev2, EV_REL, REL_X); in alps_init()
2937 input_set_capability(dev2, EV_REL, REL_Y); in alps_init()
2938 input_set_capability(dev2, EV_KEY, BTN_LEFT); in alps_init()
2939 input_set_capability(dev2, EV_KEY, BTN_RIGHT); in alps_init()
2940 input_set_capability(dev2, EV_KEY, BTN_MIDDLE); in alps_init()
2942 __set_bit(INPUT_PROP_POINTER, dev2->propbit); in alps_init()
2943 __set_bit(INPUT_PROP_POINTING_STICK, dev2->propbit); in alps_init()
2945 error = input_register_device(dev2); in alps_init()
2950 input_free_device(dev2); in alps_init()
2954 priv->dev2 = dev2; in alps_init()