Lines Matching full:dev2
221 static void alps_report_buttons(struct input_dev *dev1, struct input_dev *dev2, in alps_report_buttons() argument
228 * other device (dev2) then this event should be also in alps_report_buttons()
231 dev = (dev2 && test_bit(BTN_LEFT, dev2->key)) ? dev2 : dev1; in alps_report_buttons()
234 dev = (dev2 && test_bit(BTN_RIGHT, dev2->key)) ? dev2 : dev1; in alps_report_buttons()
237 dev = (dev2 && test_bit(BTN_MIDDLE, dev2->key)) ? dev2 : dev1; in alps_report_buttons()
244 if (dev2) in alps_report_buttons()
245 input_sync(dev2); in alps_report_buttons()
253 struct input_dev *dev2 = priv->dev2; in alps_process_packet_v1_v2() local
289 input_report_rel(dev2, REL_X, (x > 383 ? (x - 768) : x)); in alps_process_packet_v1_v2()
290 input_report_rel(dev2, REL_Y, -(y > 255 ? (y - 512) : y)); in alps_process_packet_v1_v2()
292 alps_report_buttons(dev2, dev, left, right, middle); in alps_process_packet_v1_v2()
294 input_sync(dev2); in alps_process_packet_v1_v2()
305 alps_report_buttons(dev, dev2, left, right, middle); in alps_process_packet_v1_v2()
559 struct input_dev *dev = priv->dev2; in alps_process_trackstick_packet_v3()
729 struct input_dev *dev2 = priv->dev2; in alps_process_touchpad_packet_v3_v5() local
796 input_report_key(dev2, BTN_LEFT, f->ts_left); in alps_process_touchpad_packet_v3_v5()
797 input_report_key(dev2, BTN_RIGHT, f->ts_right); in alps_process_touchpad_packet_v3_v5()
798 input_report_key(dev2, BTN_MIDDLE, f->ts_middle); in alps_process_touchpad_packet_v3_v5()
799 input_sync(dev2); in alps_process_touchpad_packet_v3_v5()
828 struct input_dev *dev2 = priv->dev2; in alps_process_packet_v6() local
855 input_report_rel(dev2, REL_X, (s8)x / 4); in alps_process_packet_v6()
856 input_report_rel(dev2, REL_Y, -((s8)y / 4)); in alps_process_packet_v6()
858 psmouse_report_standard_buttons(dev2, packet[3]); in alps_process_packet_v6()
860 input_sync(dev2); in alps_process_packet_v6()
884 psmouse_report_standard_buttons(dev2, packet[3]); in alps_process_packet_v6()
1092 struct input_dev *dev2 = priv->dev2; in alps_process_trackstick_packet_v7() local
1107 input_report_rel(dev2, REL_X, (s8)x); in alps_process_trackstick_packet_v7()
1108 input_report_rel(dev2, REL_Y, -((s8)y)); in alps_process_trackstick_packet_v7()
1109 input_report_abs(dev2, ABS_PRESSURE, z); in alps_process_trackstick_packet_v7()
1111 psmouse_report_standard_buttons(dev2, packet[1]); in alps_process_trackstick_packet_v7()
1113 input_sync(dev2); in alps_process_trackstick_packet_v7()
1319 struct input_dev *dev2 = priv->dev2; in alps_process_packet_ss4_v2() local
1363 input_report_rel(dev2, REL_X, SS4_TS_X_V2(packet)); in alps_process_packet_ss4_v2()
1364 input_report_rel(dev2, REL_Y, SS4_TS_Y_V2(packet)); in alps_process_packet_ss4_v2()
1365 input_report_abs(dev2, ABS_PRESSURE, SS4_TS_Z_V2(packet)); in alps_process_packet_ss4_v2()
1367 input_report_key(dev2, BTN_LEFT, f->ts_left); in alps_process_packet_ss4_v2()
1368 input_report_key(dev2, BTN_RIGHT, f->ts_right); in alps_process_packet_ss4_v2()
1369 input_report_key(dev2, BTN_MIDDLE, f->ts_middle); in alps_process_packet_ss4_v2()
1371 input_sync(dev2); in alps_process_packet_ss4_v2()
1413 (priv->dev2 ? "input2" : "input1")); in alps_do_register_bare_ps2_mouse()
1477 struct input_dev *dev, *dev2 = NULL; in alps_report_bare_ps2_packet() local
1483 dev = priv->dev2; in alps_report_bare_ps2_packet()
1484 dev2 = psmouse->dev; in alps_report_bare_ps2_packet()
1496 alps_report_buttons(dev, dev2, in alps_report_bare_ps2_packet()
2980 if (priv->dev2) in alps_disconnect()
2981 input_unregister_device(priv->dev2); in alps_disconnect()
3098 struct input_dev *dev2; in alps_init() local
3100 dev2 = input_allocate_device(); in alps_init()
3101 if (!dev2) { in alps_init()
3110 dev2->phys = priv->phys2; in alps_init()
3116 dev2->name = "AlpsPS/2 ALPS DualPoint Stick"; in alps_init()
3118 dev2->id.bustype = BUS_I8042; in alps_init()
3119 dev2->id.vendor = 0x0002; in alps_init()
3120 dev2->id.product = PSMOUSE_ALPS; in alps_init()
3121 dev2->id.version = priv->proto_version; in alps_init()
3122 dev2->dev.parent = &psmouse->ps2dev.serio->dev; in alps_init()
3124 input_set_capability(dev2, EV_REL, REL_X); in alps_init()
3125 input_set_capability(dev2, EV_REL, REL_Y); in alps_init()
3127 input_set_capability(dev2, EV_ABS, ABS_PRESSURE); in alps_init()
3128 input_set_abs_params(dev2, ABS_PRESSURE, 0, 127, 0, 0); in alps_init()
3130 input_set_capability(dev2, EV_KEY, BTN_LEFT); in alps_init()
3131 input_set_capability(dev2, EV_KEY, BTN_RIGHT); in alps_init()
3132 input_set_capability(dev2, EV_KEY, BTN_MIDDLE); in alps_init()
3134 __set_bit(INPUT_PROP_POINTER, dev2->propbit); in alps_init()
3135 __set_bit(INPUT_PROP_POINTING_STICK, dev2->propbit); in alps_init()
3137 error = input_register_device(dev2); in alps_init()
3142 input_free_device(dev2); in alps_init()
3146 priv->dev2 = dev2; in alps_init()