Lines Matching refs:dev2

223 static void alps_report_buttons(struct input_dev *dev1, struct input_dev *dev2,  in alps_report_buttons()  argument
233 dev = (dev2 && test_bit(BTN_LEFT, dev2->key)) ? dev2 : dev1; in alps_report_buttons()
236 dev = (dev2 && test_bit(BTN_RIGHT, dev2->key)) ? dev2 : dev1; in alps_report_buttons()
239 dev = (dev2 && test_bit(BTN_MIDDLE, dev2->key)) ? dev2 : dev1; in alps_report_buttons()
246 if (dev2) in alps_report_buttons()
247 input_sync(dev2); in alps_report_buttons()
255 struct input_dev *dev2 = priv->dev2; in alps_process_packet_v1_v2() local
291 input_report_rel(dev2, REL_X, (x > 383 ? (x - 768) : x)); in alps_process_packet_v1_v2()
292 input_report_rel(dev2, REL_Y, -(y > 255 ? (y - 512) : y)); in alps_process_packet_v1_v2()
294 alps_report_buttons(dev2, dev, left, right, middle); in alps_process_packet_v1_v2()
296 input_sync(dev2); in alps_process_packet_v1_v2()
307 alps_report_buttons(dev, dev2, left, right, middle); in alps_process_packet_v1_v2()
561 struct input_dev *dev = priv->dev2; in alps_process_trackstick_packet_v3()
731 struct input_dev *dev2 = priv->dev2; in alps_process_touchpad_packet_v3_v5() local
798 input_report_key(dev2, BTN_LEFT, f->ts_left); in alps_process_touchpad_packet_v3_v5()
799 input_report_key(dev2, BTN_RIGHT, f->ts_right); in alps_process_touchpad_packet_v3_v5()
800 input_report_key(dev2, BTN_MIDDLE, f->ts_middle); in alps_process_touchpad_packet_v3_v5()
801 input_sync(dev2); in alps_process_touchpad_packet_v3_v5()
830 struct input_dev *dev2 = priv->dev2; in alps_process_packet_v6() local
857 input_report_rel(dev2, REL_X, (char)x / 4); in alps_process_packet_v6()
858 input_report_rel(dev2, REL_Y, -((char)y / 4)); in alps_process_packet_v6()
860 psmouse_report_standard_buttons(dev2, packet[3]); in alps_process_packet_v6()
862 input_sync(dev2); in alps_process_packet_v6()
886 psmouse_report_standard_buttons(dev2, packet[3]); in alps_process_packet_v6()
1094 struct input_dev *dev2 = priv->dev2; in alps_process_trackstick_packet_v7() local
1109 input_report_rel(dev2, REL_X, (char)x); in alps_process_trackstick_packet_v7()
1110 input_report_rel(dev2, REL_Y, -((char)y)); in alps_process_trackstick_packet_v7()
1111 input_report_abs(dev2, ABS_PRESSURE, z); in alps_process_trackstick_packet_v7()
1113 psmouse_report_standard_buttons(dev2, packet[1]); in alps_process_trackstick_packet_v7()
1115 input_sync(dev2); in alps_process_trackstick_packet_v7()
1321 struct input_dev *dev2 = priv->dev2; in alps_process_packet_ss4_v2() local
1365 input_report_rel(dev2, REL_X, SS4_TS_X_V2(packet)); in alps_process_packet_ss4_v2()
1366 input_report_rel(dev2, REL_Y, SS4_TS_Y_V2(packet)); in alps_process_packet_ss4_v2()
1367 input_report_abs(dev2, ABS_PRESSURE, SS4_TS_Z_V2(packet)); in alps_process_packet_ss4_v2()
1369 input_report_key(dev2, BTN_LEFT, f->ts_left); in alps_process_packet_ss4_v2()
1370 input_report_key(dev2, BTN_RIGHT, f->ts_right); in alps_process_packet_ss4_v2()
1371 input_report_key(dev2, BTN_MIDDLE, f->ts_middle); in alps_process_packet_ss4_v2()
1373 input_sync(dev2); in alps_process_packet_ss4_v2()
1423 (priv->dev2 ? "input2" : "input1")); in alps_register_bare_ps2_mouse()
1473 struct input_dev *dev, *dev2 = NULL; in alps_report_bare_ps2_packet() local
1479 dev = priv->dev2; in alps_report_bare_ps2_packet()
1480 dev2 = psmouse->dev; in alps_report_bare_ps2_packet()
1492 alps_report_buttons(dev, dev2, in alps_report_bare_ps2_packet()
2959 if (priv->dev2) in alps_disconnect()
2960 input_unregister_device(priv->dev2); in alps_disconnect()
3077 struct input_dev *dev2; in alps_init() local
3079 dev2 = input_allocate_device(); in alps_init()
3080 if (!dev2) { in alps_init()
3089 dev2->phys = priv->phys2; in alps_init()
3095 dev2->name = "AlpsPS/2 ALPS DualPoint Stick"; in alps_init()
3097 dev2->id.bustype = BUS_I8042; in alps_init()
3098 dev2->id.vendor = 0x0002; in alps_init()
3099 dev2->id.product = PSMOUSE_ALPS; in alps_init()
3100 dev2->id.version = priv->proto_version; in alps_init()
3101 dev2->dev.parent = &psmouse->ps2dev.serio->dev; in alps_init()
3103 input_set_capability(dev2, EV_REL, REL_X); in alps_init()
3104 input_set_capability(dev2, EV_REL, REL_Y); in alps_init()
3106 input_set_capability(dev2, EV_ABS, ABS_PRESSURE); in alps_init()
3107 input_set_abs_params(dev2, ABS_PRESSURE, 0, 127, 0, 0); in alps_init()
3109 input_set_capability(dev2, EV_KEY, BTN_LEFT); in alps_init()
3110 input_set_capability(dev2, EV_KEY, BTN_RIGHT); in alps_init()
3111 input_set_capability(dev2, EV_KEY, BTN_MIDDLE); in alps_init()
3113 __set_bit(INPUT_PROP_POINTER, dev2->propbit); in alps_init()
3114 __set_bit(INPUT_PROP_POINTING_STICK, dev2->propbit); in alps_init()
3116 error = input_register_device(dev2); in alps_init()
3121 input_free_device(dev2); in alps_init()
3125 priv->dev2 = dev2; in alps_init()