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()
554 struct input_dev *dev = priv->dev2; in alps_process_trackstick_packet_v3()
723 struct input_dev *dev2 = priv->dev2; in alps_process_touchpad_packet_v3_v5() local
790 input_report_key(dev2, BTN_LEFT, f->ts_left); in alps_process_touchpad_packet_v3_v5()
791 input_report_key(dev2, BTN_RIGHT, f->ts_right); in alps_process_touchpad_packet_v3_v5()
792 input_report_key(dev2, BTN_MIDDLE, f->ts_middle); in alps_process_touchpad_packet_v3_v5()
793 input_sync(dev2); in alps_process_touchpad_packet_v3_v5()
822 struct input_dev *dev2 = priv->dev2; in alps_process_packet_v6() local
852 input_report_rel(dev2, REL_X, (char)x / 4); in alps_process_packet_v6()
853 input_report_rel(dev2, REL_Y, -((char)y / 4)); in alps_process_packet_v6()
855 input_report_key(dev2, BTN_LEFT, left); in alps_process_packet_v6()
856 input_report_key(dev2, BTN_RIGHT, right); in alps_process_packet_v6()
857 input_report_key(dev2, BTN_MIDDLE, middle); in alps_process_packet_v6()
859 input_sync(dev2); in alps_process_packet_v6()
1093 struct input_dev *dev2 = priv->dev2; in alps_process_trackstick_packet_v7() local
1112 input_report_rel(dev2, REL_X, (char)x); in alps_process_trackstick_packet_v7()
1113 input_report_rel(dev2, REL_Y, -((char)y)); in alps_process_trackstick_packet_v7()
1115 input_report_key(dev2, BTN_LEFT, left); in alps_process_trackstick_packet_v7()
1116 input_report_key(dev2, BTN_RIGHT, right); in alps_process_trackstick_packet_v7()
1117 input_report_key(dev2, BTN_MIDDLE, middle); in alps_process_trackstick_packet_v7()
1119 input_sync(dev2); in alps_process_trackstick_packet_v7()
1348 (priv->dev2 ? "input2" : "input1")); in alps_register_bare_ps2_mouse()
1398 struct input_dev *dev, *dev2 = NULL; in alps_report_bare_ps2_packet() local
1404 dev = priv->dev2; in alps_report_bare_ps2_packet()
1405 dev2 = psmouse->dev; in alps_report_bare_ps2_packet()
1417 alps_report_buttons(dev, dev2, in alps_report_bare_ps2_packet()
2800 if (priv->dev2) in alps_disconnect()
2801 input_unregister_device(priv->dev2); in alps_disconnect()
2918 struct input_dev *dev2; in alps_init() local
2920 dev2 = input_allocate_device(); in alps_init()
2921 if (!dev2) { in alps_init()
2930 dev2->phys = priv->phys2; in alps_init()
2936 dev2->name = "AlpsPS/2 ALPS DualPoint Stick"; in alps_init()
2938 dev2->id.bustype = BUS_I8042; in alps_init()
2939 dev2->id.vendor = 0x0002; in alps_init()
2940 dev2->id.product = PSMOUSE_ALPS; in alps_init()
2941 dev2->id.version = priv->proto_version; in alps_init()
2942 dev2->dev.parent = &psmouse->ps2dev.serio->dev; in alps_init()
2944 input_set_capability(dev2, EV_REL, REL_X); in alps_init()
2945 input_set_capability(dev2, EV_REL, REL_Y); in alps_init()
2946 input_set_capability(dev2, EV_KEY, BTN_LEFT); in alps_init()
2947 input_set_capability(dev2, EV_KEY, BTN_RIGHT); in alps_init()
2948 input_set_capability(dev2, EV_KEY, BTN_MIDDLE); in alps_init()
2950 __set_bit(INPUT_PROP_POINTER, dev2->propbit); in alps_init()
2951 __set_bit(INPUT_PROP_POINTING_STICK, dev2->propbit); in alps_init()
2953 error = input_register_device(dev2); in alps_init()
2958 input_free_device(dev2); in alps_init()
2962 priv->dev2 = dev2; in alps_init()