Lines Matching refs:dev2

221 static void alps_report_buttons(struct input_dev *dev1, struct input_dev *dev2,  in alps_report_buttons()  argument
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, (char)x / 4); in alps_process_packet_v6()
856 input_report_rel(dev2, REL_Y, -((char)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, (char)x); in alps_process_trackstick_packet_v7()
1108 input_report_rel(dev2, REL_Y, -((char)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()
1421 (priv->dev2 ? "input2" : "input1")); in alps_register_bare_ps2_mouse()
1471 struct input_dev *dev, *dev2 = NULL; in alps_report_bare_ps2_packet() local
1477 dev = priv->dev2; in alps_report_bare_ps2_packet()
1478 dev2 = psmouse->dev; in alps_report_bare_ps2_packet()
1490 alps_report_buttons(dev, dev2, in alps_report_bare_ps2_packet()
2974 if (priv->dev2) in alps_disconnect()
2975 input_unregister_device(priv->dev2); in alps_disconnect()
3092 struct input_dev *dev2; in alps_init() local
3094 dev2 = input_allocate_device(); in alps_init()
3095 if (!dev2) { in alps_init()
3104 dev2->phys = priv->phys2; in alps_init()
3110 dev2->name = "AlpsPS/2 ALPS DualPoint Stick"; in alps_init()
3112 dev2->id.bustype = BUS_I8042; in alps_init()
3113 dev2->id.vendor = 0x0002; in alps_init()
3114 dev2->id.product = PSMOUSE_ALPS; in alps_init()
3115 dev2->id.version = priv->proto_version; in alps_init()
3116 dev2->dev.parent = &psmouse->ps2dev.serio->dev; in alps_init()
3118 input_set_capability(dev2, EV_REL, REL_X); in alps_init()
3119 input_set_capability(dev2, EV_REL, REL_Y); in alps_init()
3121 input_set_capability(dev2, EV_ABS, ABS_PRESSURE); in alps_init()
3122 input_set_abs_params(dev2, ABS_PRESSURE, 0, 127, 0, 0); in alps_init()
3124 input_set_capability(dev2, EV_KEY, BTN_LEFT); in alps_init()
3125 input_set_capability(dev2, EV_KEY, BTN_RIGHT); in alps_init()
3126 input_set_capability(dev2, EV_KEY, BTN_MIDDLE); in alps_init()
3128 __set_bit(INPUT_PROP_POINTER, dev2->propbit); in alps_init()
3129 __set_bit(INPUT_PROP_POINTING_STICK, dev2->propbit); in alps_init()
3131 error = input_register_device(dev2); in alps_init()
3136 input_free_device(dev2); in alps_init()
3140 priv->dev2 = dev2; in alps_init()