Lines Matching +full:0 +full:xf8

29 #define ALPS_CMD_NIBBLE_10	0x01f2
31 #define ALPS_REG_BASE_RUSHMORE 0xc2c0
32 #define ALPS_REG_BASE_V7 0xc2c0
33 #define ALPS_REG_BASE_PINNACLE 0x0000
36 { PSMOUSE_CMD_SETPOLL, 0x00 }, /* 0 */
37 { PSMOUSE_CMD_RESET_DIS, 0x00 }, /* 1 */
38 { PSMOUSE_CMD_SETSCALE21, 0x00 }, /* 2 */
39 { PSMOUSE_CMD_SETRATE, 0x0a }, /* 3 */
40 { PSMOUSE_CMD_SETRATE, 0x14 }, /* 4 */
41 { PSMOUSE_CMD_SETRATE, 0x28 }, /* 5 */
42 { PSMOUSE_CMD_SETRATE, 0x3c }, /* 6 */
43 { PSMOUSE_CMD_SETRATE, 0x50 }, /* 7 */
44 { PSMOUSE_CMD_SETRATE, 0x64 }, /* 8 */
45 { PSMOUSE_CMD_SETRATE, 0xc8 }, /* 9 */
46 { ALPS_CMD_NIBBLE_10, 0x00 }, /* a */
47 { PSMOUSE_CMD_SETRES, 0x00 }, /* b */
48 { PSMOUSE_CMD_SETRES, 0x01 }, /* c */
49 { PSMOUSE_CMD_SETRES, 0x02 }, /* d */
50 { PSMOUSE_CMD_SETRES, 0x03 }, /* e */
51 { PSMOUSE_CMD_SETSCALE11, 0x00 }, /* f */
55 { PSMOUSE_CMD_ENABLE, 0x00 }, /* 0 */
56 { PSMOUSE_CMD_RESET_DIS, 0x00 }, /* 1 */
57 { PSMOUSE_CMD_SETSCALE21, 0x00 }, /* 2 */
58 { PSMOUSE_CMD_SETRATE, 0x0a }, /* 3 */
59 { PSMOUSE_CMD_SETRATE, 0x14 }, /* 4 */
60 { PSMOUSE_CMD_SETRATE, 0x28 }, /* 5 */
61 { PSMOUSE_CMD_SETRATE, 0x3c }, /* 6 */
62 { PSMOUSE_CMD_SETRATE, 0x50 }, /* 7 */
63 { PSMOUSE_CMD_SETRATE, 0x64 }, /* 8 */
64 { PSMOUSE_CMD_SETRATE, 0xc8 }, /* 9 */
65 { ALPS_CMD_NIBBLE_10, 0x00 }, /* a */
66 { PSMOUSE_CMD_SETRES, 0x00 }, /* b */
67 { PSMOUSE_CMD_SETRES, 0x01 }, /* c */
68 { PSMOUSE_CMD_SETRES, 0x02 }, /* d */
69 { PSMOUSE_CMD_SETRES, 0x03 }, /* e */
70 { PSMOUSE_CMD_SETSCALE11, 0x00 }, /* f */
74 { PSMOUSE_CMD_ENABLE, 0x00 }, /* 0 */
75 { PSMOUSE_CMD_SETRATE, 0x0a }, /* 1 */
76 { PSMOUSE_CMD_SETRATE, 0x14 }, /* 2 */
77 { PSMOUSE_CMD_SETRATE, 0x28 }, /* 3 */
78 { PSMOUSE_CMD_SETRATE, 0x3c }, /* 4 */
79 { PSMOUSE_CMD_SETRATE, 0x50 }, /* 5 */
80 { PSMOUSE_CMD_SETRATE, 0x64 }, /* 6 */
81 { PSMOUSE_CMD_SETRATE, 0xc8 }, /* 7 */
82 { PSMOUSE_CMD_GETID, 0x00 }, /* 8 */
83 { PSMOUSE_CMD_GETINFO, 0x00 }, /* 9 */
84 { PSMOUSE_CMD_SETRES, 0x00 }, /* a */
85 { PSMOUSE_CMD_SETRES, 0x01 }, /* b */
86 { PSMOUSE_CMD_SETRES, 0x02 }, /* c */
87 { PSMOUSE_CMD_SETRES, 0x03 }, /* d */
88 { PSMOUSE_CMD_SETSCALE21, 0x00 }, /* e */
89 { PSMOUSE_CMD_SETSCALE11, 0x00 }, /* f */
93 #define ALPS_DUALPOINT 0x02 /* touchpad has trackstick */
94 #define ALPS_PASS 0x04 /* device has a pass-through port */
96 #define ALPS_WHEEL 0x08 /* hardware wheel present */
97 #define ALPS_FW_BK_1 0x10 /* front & back buttons present */
98 #define ALPS_FW_BK_2 0x20 /* front & back buttons present */
99 #define ALPS_FOUR_BUTTONS 0x40 /* 4 direction button present */
100 #define ALPS_PS2_INTERLEAVED 0x80 /* 3-byte PS/2 packet interleaved with
102 #define ALPS_STICK_BITS 0x100 /* separate stick button bits */
103 #define ALPS_BUTTONPAD 0x200 /* device is a clickpad */
104 #define ALPS_DUALPOINT_WITH_PRESSURE 0x400 /* device can report trackpoint pressure */
109 * which is what a normal mouse would report. Also, the value 0x0e
112 { { 0x20, 0x02, 0x0e }, { ALPS_PROTO_V2, 0xf8, 0xf8, ALPS_PASS | ALPS_DUALPOINT } },
114 { { 0x22, 0x02, 0x0a }, { ALPS_PROTO_V2, 0xf8, 0xf8, ALPS_PASS | ALPS_DUALPOINT } },
115 …{ { 0x22, 0x02, 0x14 }, { ALPS_PROTO_V2, 0xff, 0xff, ALPS_PASS | ALPS_DUALPOINT } }, /* Dell Latit…
116 …{ { 0x32, 0x02, 0x14 }, { ALPS_PROTO_V2, 0xf8, 0xf8, ALPS_PASS | ALPS_DUALPOINT } }, /* Toshiba Sa…
117 { { 0x33, 0x02, 0x0a }, { ALPS_PROTO_V1, 0x88, 0xf8, 0 } }, /* UMAX-530T */
118 { { 0x52, 0x01, 0x14 }, { ALPS_PROTO_V2, 0xff, 0xff,
120 { { 0x53, 0x02, 0x0a }, { ALPS_PROTO_V2, 0xf8, 0xf8, 0 } },
121 { { 0x53, 0x02, 0x14 }, { ALPS_PROTO_V2, 0xf8, 0xf8, 0 } },
122 { { 0x60, 0x03, 0xc8 }, { ALPS_PROTO_V2, 0xf8, 0xf8, 0 } }, /* HP ze1115 */
123 { { 0x62, 0x02, 0x14 }, { ALPS_PROTO_V2, 0xcf, 0xcf,
125 { { 0x63, 0x02, 0x0a }, { ALPS_PROTO_V2, 0xf8, 0xf8, 0 } },
126 { { 0x63, 0x02, 0x14 }, { ALPS_PROTO_V2, 0xf8, 0xf8, 0 } },
127 …{ { 0x63, 0x02, 0x28 }, { ALPS_PROTO_V2, 0xf8, 0xf8, ALPS_FW_BK_2 } }, /* Fujitsu Siemens S6010 …
128 …{ { 0x63, 0x02, 0x3c }, { ALPS_PROTO_V2, 0x8f, 0x8f, ALPS_WHEEL } }, /* Toshiba Satellite S2400-…
129 { { 0x63, 0x02, 0x50 }, { ALPS_PROTO_V2, 0xef, 0xef, ALPS_FW_BK_1 } }, /* NEC Versa L320 */
130 { { 0x63, 0x02, 0x64 }, { ALPS_PROTO_V2, 0xf8, 0xf8, 0 } },
131 …{ { 0x63, 0x03, 0xc8 }, { ALPS_PROTO_V2, 0xf8, 0xf8, ALPS_PASS | ALPS_DUALPOINT } }, /* Dell Latit…
132 …{ { 0x73, 0x00, 0x0a }, { ALPS_PROTO_V2, 0xf8, 0xf8, ALPS_DUALPOINT } }, /* ThinkPad R61 8918-5QG…
133 { { 0x73, 0x00, 0x14 }, { ALPS_PROTO_V6, 0xff, 0xff, ALPS_DUALPOINT } }, /* Dell XT2 */
134 { { 0x73, 0x02, 0x0a }, { ALPS_PROTO_V2, 0xf8, 0xf8, 0 } },
135 { { 0x73, 0x02, 0x14 }, { ALPS_PROTO_V2, 0xf8, 0xf8, ALPS_FW_BK_2 } }, /* Ahtec Laptop */
136 { { 0x73, 0x02, 0x50 }, { ALPS_PROTO_V2, 0xcf, 0xcf, ALPS_FOUR_BUTTONS } }, /* Dell Vostro 1400 */
140 ALPS_PROTO_V3, 0x8f, 0x8f, ALPS_DUALPOINT | ALPS_DUALPOINT_WITH_PRESSURE
144 ALPS_PROTO_V3_RUSHMORE, 0x8f, 0x8f, ALPS_DUALPOINT | ALPS_DUALPOINT_WITH_PRESSURE
148 ALPS_PROTO_V4, 0x8f, 0x8f, 0
152 ALPS_PROTO_V5, 0xc8, 0xd8, 0
156 ALPS_PROTO_V7, 0x48, 0x48, ALPS_DUALPOINT | ALPS_DUALPOINT_WITH_PRESSURE
160 ALPS_PROTO_V8, 0x18, 0x18, 0
164 ALPS_PROTO_V9, 0xc8, 0xc8, 0
255 int back = 0, forward = 0; in alps_process_packet_v1_v2()
258 left = packet[2] & 0x10; in alps_process_packet_v1_v2()
259 right = packet[2] & 0x08; in alps_process_packet_v1_v2()
260 middle = 0; in alps_process_packet_v1_v2()
261 x = packet[1] | ((packet[0] & 0x07) << 7); in alps_process_packet_v1_v2()
262 y = packet[4] | ((packet[3] & 0x07) << 7); in alps_process_packet_v1_v2()
268 x = packet[1] | ((packet[2] & 0x78) << (7 - 3)); in alps_process_packet_v1_v2()
269 y = packet[4] | ((packet[3] & 0x70) << (7 - 4)); in alps_process_packet_v1_v2()
274 back = packet[0] & 0x10; in alps_process_packet_v1_v2()
282 forward = back = 0; in alps_process_packet_v1_v2()
300 left |= packet[0] & 1; in alps_process_packet_v1_v2()
301 right |= packet[0] & 2; in alps_process_packet_v1_v2()
302 middle |= packet[0] & 4; in alps_process_packet_v1_v2()
314 * sequence Z>0, Z==0, Z>0, so the Z==0 event has to be generated manually. in alps_process_packet_v1_v2()
319 input_report_abs(dev, ABS_PRESSURE, 0); in alps_process_packet_v1_v2()
320 input_report_key(dev, BTN_TOOL_FINGER, 0); in alps_process_packet_v1_v2()
328 input_report_key(dev, BTN_TOUCH, 0); in alps_process_packet_v1_v2()
330 if (z > 0) { in alps_process_packet_v1_v2()
336 input_report_key(dev, BTN_TOOL_FINGER, z > 0); in alps_process_packet_v1_v2()
339 input_report_rel(dev, REL_WHEEL, ((packet[2] << 1) & 0x08) - ((packet[0] >> 4) & 0x07)); in alps_process_packet_v1_v2()
348 input_report_key(dev, BTN_1, packet[0] & 0x10); in alps_process_packet_v1_v2()
350 input_report_key(dev, BTN_3, packet[0] & 0x20); in alps_process_packet_v1_v2()
362 int i, bit, prev_bit = 0; in alps_get_bitmap_points()
365 for (i = 0; map != 0; i++, map >>= 1) { in alps_get_bitmap_points()
370 point->num_bits = 0; in alps_get_bitmap_points()
384 * fingers detected. A return value of 0 means at least one of the
390 * is greater than 0.
395 int i, fingers_x = 0, fingers_y = 0, fingers, closest; in alps_process_bitmap()
396 struct alps_bitmap_point x_low = {0,}, x_high = {0,}; in alps_process_bitmap()
397 struct alps_bitmap_point y_low = {0,}, y_high = {0,}; in alps_process_bitmap()
401 return 0; in alps_process_bitmap()
430 corner[0].x = in alps_process_bitmap()
433 corner[0].y = in alps_process_bitmap()
463 for (i = 0; i < 4; i++) in alps_process_bitmap()
470 for (i = 0; i < 4; i++) in alps_process_bitmap()
481 closest = 0x7fffffff; in alps_process_bitmap()
482 for (i = 0; i < 4; i++) { in alps_process_bitmap()
496 fields->mt[0] = fields->st; in alps_process_bitmap()
517 input_mt_assign_slots(dev, slot, f->mt, n, 0); in alps_report_mt_data()
518 for (i = 0; i < n; i++) in alps_report_mt_data()
532 f->mt[0].x = f->st.x; in alps_report_semi_mt_data()
533 f->mt[0].y = f->st.y; in alps_report_semi_mt_data()
534 fingers = f->pressure > 0 ? 1 : 0; in alps_report_semi_mt_data()
539 alps_set_slot(dev, 0, f->mt[0].x, f->mt[0].y); in alps_report_semi_mt_data()
570 if (!(packet[0] & 0x40)) { in alps_process_trackstick_packet_v3()
579 if (packet[1] == 0x7f && packet[2] == 0x7f && packet[4] == 0x7f) in alps_process_trackstick_packet_v3()
582 x = (s8)(((packet[0] & 0x20) << 2) | (packet[1] & 0x7f)); in alps_process_trackstick_packet_v3()
583 y = (s8)(((packet[0] & 0x10) << 3) | (packet[2] & 0x7f)); in alps_process_trackstick_packet_v3()
584 z = packet[4] & 0x7f; in alps_process_trackstick_packet_v3()
605 left = packet[3] & 0x01; in alps_process_trackstick_packet_v3()
606 right = packet[3] & 0x02; in alps_process_trackstick_packet_v3()
607 middle = packet[3] & 0x04; in alps_process_trackstick_packet_v3()
625 f->left = !!(p[3] & 0x01); in alps_decode_buttons_v3()
626 f->right = !!(p[3] & 0x02); in alps_decode_buttons_v3()
627 f->middle = !!(p[3] & 0x04); in alps_decode_buttons_v3()
629 f->ts_left = !!(p[3] & 0x10); in alps_decode_buttons_v3()
630 f->ts_right = !!(p[3] & 0x20); in alps_decode_buttons_v3()
631 f->ts_middle = !!(p[3] & 0x40); in alps_decode_buttons_v3()
637 f->first_mp = !!(p[4] & 0x40); in alps_decode_pinnacle()
638 f->is_mp = !!(p[0] & 0x40); in alps_decode_pinnacle()
641 f->fingers = (p[5] & 0x3) + 1; in alps_decode_pinnacle()
642 f->x_map = ((p[4] & 0x7e) << 8) | in alps_decode_pinnacle()
643 ((p[1] & 0x7f) << 2) | in alps_decode_pinnacle()
644 ((p[0] & 0x30) >> 4); in alps_decode_pinnacle()
645 f->y_map = ((p[3] & 0x70) << 4) | in alps_decode_pinnacle()
646 ((p[2] & 0x7f) << 1) | in alps_decode_pinnacle()
647 (p[4] & 0x01); in alps_decode_pinnacle()
649 f->st.x = ((p[1] & 0x7f) << 4) | ((p[4] & 0x30) >> 2) | in alps_decode_pinnacle()
650 ((p[0] & 0x30) >> 4); in alps_decode_pinnacle()
651 f->st.y = ((p[2] & 0x7f) << 4) | (p[4] & 0x0f); in alps_decode_pinnacle()
652 f->pressure = p[5] & 0x7f; in alps_decode_pinnacle()
657 return 0; in alps_decode_pinnacle()
663 f->first_mp = !!(p[4] & 0x40); in alps_decode_rushmore()
664 f->is_mp = !!(p[5] & 0x40); in alps_decode_rushmore()
667 f->fingers = max((p[5] & 0x3), ((p[5] >> 2) & 0x3)) + 1; in alps_decode_rushmore()
668 f->x_map = ((p[5] & 0x10) << 11) | in alps_decode_rushmore()
669 ((p[4] & 0x7e) << 8) | in alps_decode_rushmore()
670 ((p[1] & 0x7f) << 2) | in alps_decode_rushmore()
671 ((p[0] & 0x30) >> 4); in alps_decode_rushmore()
672 f->y_map = ((p[5] & 0x20) << 6) | in alps_decode_rushmore()
673 ((p[3] & 0x70) << 4) | in alps_decode_rushmore()
674 ((p[2] & 0x7f) << 1) | in alps_decode_rushmore()
675 (p[4] & 0x01); in alps_decode_rushmore()
677 f->st.x = ((p[1] & 0x7f) << 4) | ((p[4] & 0x30) >> 2) | in alps_decode_rushmore()
678 ((p[0] & 0x30) >> 4); in alps_decode_rushmore()
679 f->st.y = ((p[2] & 0x7f) << 4) | (p[4] & 0x0f); in alps_decode_rushmore()
680 f->pressure = p[5] & 0x7f; in alps_decode_rushmore()
685 return 0; in alps_decode_rushmore()
691 u64 palm_data = 0; in alps_decode_dolphin()
694 f->first_mp = !!(p[0] & 0x02); in alps_decode_dolphin()
695 f->is_mp = !!(p[0] & 0x20); in alps_decode_dolphin()
698 f->st.x = ((p[1] & 0x7f) | ((p[4] & 0x0f) << 7)); in alps_decode_dolphin()
699 f->st.y = ((p[2] & 0x7f) | ((p[4] & 0xf0) << 3)); in alps_decode_dolphin()
700 f->pressure = (p[0] & 4) ? 0 : p[5] & 0x7f; in alps_decode_dolphin()
703 f->fingers = ((p[0] & 0x6) >> 1 | in alps_decode_dolphin()
704 (p[0] & 0x10) >> 2); in alps_decode_dolphin()
706 palm_data = (p[1] & 0x7f) | in alps_decode_dolphin()
707 ((p[2] & 0x7f) << 7) | in alps_decode_dolphin()
708 ((p[4] & 0x7f) << 14) | in alps_decode_dolphin()
709 ((p[5] & 0x7f) << 21) | in alps_decode_dolphin()
710 ((p[3] & 0x07) << 28) | in alps_decode_dolphin()
711 (((u64)p[3] & 0x70) << 27) | in alps_decode_dolphin()
712 (((u64)p[0] & 0x01) << 34); in alps_decode_dolphin()
714 /* Y-profile is stored in P(0) to p(n-1), n = y_bits; */ in alps_decode_dolphin()
722 return 0; in alps_decode_dolphin()
731 int fingers = 0; in alps_process_touchpad_packet_v3_v5()
733 memset(f, 0, sizeof(*f)); in alps_process_touchpad_packet_v3_v5()
757 if (alps_process_bitmap(priv, f) == 0) in alps_process_touchpad_packet_v3_v5()
758 fingers = 0; /* Use st data */ in alps_process_touchpad_packet_v3_v5()
760 priv->multi_packet = 0; in alps_process_touchpad_packet_v3_v5()
765 * Bit 6 of byte 0 is not usually set in position packets. The only in alps_process_touchpad_packet_v3_v5()
781 priv->multi_packet = 0; in alps_process_touchpad_packet_v3_v5()
784 * Sometimes the hardware sends a single packet with z = 0 in alps_process_touchpad_packet_v3_v5()
811 * having 0x3f in the last byte. This value has never been in alps_process_packet_v3()
815 if (packet[5] == 0x3f) { in alps_process_packet_v3()
834 * Touchpad: 0 - 0x7E in alps_process_packet_v6()
835 * Trackpoint: 0x7F in alps_process_packet_v6()
837 if (packet[5] == 0x7F) { in alps_process_packet_v6()
846 x = packet[1] | ((packet[3] & 0x20) << 2); in alps_process_packet_v6()
847 y = packet[2] | ((packet[3] & 0x40) << 1); in alps_process_packet_v6()
851 if (x == 0x7F && y == 0x7F && z == 0x7F) in alps_process_packet_v6()
852 x = y = z = 0; in alps_process_packet_v6()
865 x = packet[1] | ((packet[3] & 0x78) << 4); in alps_process_packet_v6()
866 y = packet[2] | ((packet[4] & 0x78) << 4); in alps_process_packet_v6()
872 input_report_key(dev, BTN_TOUCH, 0); in alps_process_packet_v6()
874 if (z > 0) { in alps_process_packet_v6()
880 input_report_key(dev, BTN_TOOL_FINGER, z > 0); in alps_process_packet_v6()
901 if (packet[6] & 0x40) { in alps_process_packet_v4()
903 priv->multi_packet = 0; in alps_process_packet_v4()
913 f->left = !!(packet[4] & 0x01); in alps_process_packet_v4()
914 f->right = !!(packet[4] & 0x02); in alps_process_packet_v4()
916 f->st.x = ((packet[1] & 0x7f) << 4) | ((packet[3] & 0x30) >> 2) | in alps_process_packet_v4()
917 ((packet[0] & 0x30) >> 4); in alps_process_packet_v4()
918 f->st.y = ((packet[2] & 0x7f) << 4) | (packet[3] & 0x0f); in alps_process_packet_v4()
919 f->pressure = packet[5] & 0x7f; in alps_process_packet_v4()
922 priv->multi_packet = 0; in alps_process_packet_v4()
924 f->x_map = ((priv->multi_data[2] & 0x1f) << 10) | in alps_process_packet_v4()
925 ((priv->multi_data[3] & 0x60) << 3) | in alps_process_packet_v4()
926 ((priv->multi_data[0] & 0x3f) << 2) | in alps_process_packet_v4()
927 ((priv->multi_data[1] & 0x60) >> 5); in alps_process_packet_v4()
928 f->y_map = ((priv->multi_data[5] & 0x01) << 10) | in alps_process_packet_v4()
929 ((priv->multi_data[3] & 0x1f) << 5) | in alps_process_packet_v4()
930 (priv->multi_data[1] & 0x1f); in alps_process_packet_v4()
942 return (psmouse->packet[2] & 0x40) == 0x40; in alps_is_valid_package_v7()
944 return (psmouse->packet[3] & 0x48) == 0x48; in alps_is_valid_package_v7()
946 return (psmouse->packet[5] & 0x40) == 0x00; in alps_is_valid_package_v7()
955 if (byte[4] & 0x40) in alps_get_packet_id_v7()
957 else if (byte[4] & 0x01) in alps_get_packet_id_v7()
959 else if ((byte[0] & 0x10) && !(byte[4] & 0x43)) in alps_get_packet_id_v7()
961 else if (byte[1] == 0x00 && byte[4] == 0x00) in alps_get_packet_id_v7()
973 mt[0].x = ((pkt[2] & 0x80) << 4); in alps_get_finger_coordinate_v7()
974 mt[0].x |= ((pkt[2] & 0x3F) << 5); in alps_get_finger_coordinate_v7()
975 mt[0].x |= ((pkt[3] & 0x30) >> 1); in alps_get_finger_coordinate_v7()
976 mt[0].x |= (pkt[3] & 0x07); in alps_get_finger_coordinate_v7()
977 mt[0].y = (pkt[1] << 3) | (pkt[0] & 0x07); in alps_get_finger_coordinate_v7()
979 mt[1].x = ((pkt[3] & 0x80) << 4); in alps_get_finger_coordinate_v7()
980 mt[1].x |= ((pkt[4] & 0x80) << 3); in alps_get_finger_coordinate_v7()
981 mt[1].x |= ((pkt[4] & 0x3F) << 4); in alps_get_finger_coordinate_v7()
982 mt[1].y = ((pkt[5] & 0x80) << 3); in alps_get_finger_coordinate_v7()
983 mt[1].y |= ((pkt[5] & 0x3F) << 4); in alps_get_finger_coordinate_v7()
987 mt[1].x &= ~0x000F; in alps_get_finger_coordinate_v7()
988 mt[1].y |= 0x000F; in alps_get_finger_coordinate_v7()
990 if (mt[1].y == 0x7ff && mt[1].x == 0xff0) { in alps_get_finger_coordinate_v7()
991 mt[1].x = 0; in alps_get_finger_coordinate_v7()
992 /* y gets set to 0 at the end of this function */ in alps_get_finger_coordinate_v7()
997 mt[1].x &= ~0x003F; in alps_get_finger_coordinate_v7()
998 mt[1].y &= ~0x0020; in alps_get_finger_coordinate_v7()
999 mt[1].y |= ((pkt[4] & 0x02) << 4); in alps_get_finger_coordinate_v7()
1000 mt[1].y |= 0x001F; in alps_get_finger_coordinate_v7()
1004 mt[1].x &= ~0x003F; in alps_get_finger_coordinate_v7()
1005 mt[1].x |= (pkt[0] & 0x20); in alps_get_finger_coordinate_v7()
1006 mt[1].y |= 0x000F; in alps_get_finger_coordinate_v7()
1010 mt[0].y = 0x7FF - mt[0].y; in alps_get_finger_coordinate_v7()
1011 mt[1].y = 0x7FF - mt[1].y; in alps_get_finger_coordinate_v7()
1016 int i, fingers = 0; in alps_get_mt_count()
1018 for (i = 0; i < MAX_TOUCHES; i++) { in alps_get_mt_count()
1019 if (mt[i].x != 0 || mt[i].y != 0) in alps_get_mt_count()
1035 return 0; in alps_decode_packet_v7()
1041 * slot 0 to 1 or vice versa. INPUT_MT_TRACK takes care of this for in alps_decode_packet_v7()
1064 f->fingers = 3 + (p[5] & 0x03); in alps_decode_packet_v7()
1066 f->left = (p[0] & 0x80) >> 7; in alps_decode_packet_v7()
1068 if (p[0] & 0x20) in alps_decode_packet_v7()
1070 if (p[0] & 0x10) in alps_decode_packet_v7()
1073 f->right = (p[0] & 0x20) >> 5; in alps_decode_packet_v7()
1074 f->middle = (p[0] & 0x10) >> 4; in alps_decode_packet_v7()
1077 /* Sometimes a single touch is reported in mt[1] rather then mt[0] */ in alps_decode_packet_v7()
1078 if (f->fingers == 1 && f->mt[0].x == 0 && f->mt[0].y == 0) { in alps_decode_packet_v7()
1079 f->mt[0].x = f->mt[1].x; in alps_decode_packet_v7()
1080 f->mt[0].y = f->mt[1].y; in alps_decode_packet_v7()
1081 f->mt[1].x = 0; in alps_decode_packet_v7()
1082 f->mt[1].y = 0; in alps_decode_packet_v7()
1085 return 0; in alps_decode_packet_v7()
1102 x = ((packet[2] & 0xbf)) | ((packet[3] & 0x10) << 2); in alps_process_trackstick_packet_v7()
1103 y = (packet[3] & 0x07) | (packet[4] & 0xb8) | in alps_process_trackstick_packet_v7()
1104 ((packet[3] & 0x20) << 1); in alps_process_trackstick_packet_v7()
1105 z = (packet[5] & 0x3f) | ((packet[3] & 0x80) >> 1); in alps_process_trackstick_packet_v7()
1122 memset(f, 0, sizeof(*f)); in alps_process_touchpad_packet_v7()
1142 if (packet[0] == 0x48 && (packet[4] & 0x47) == 0x06) in alps_process_packet_v7()
1152 switch (byte[3] & 0x30) { in alps_get_pkt_id_ss4_v2()
1153 case 0x00: in alps_get_pkt_id_ss4_v2()
1160 case 0x10: in alps_get_pkt_id_ss4_v2()
1164 case 0x20: in alps_get_pkt_id_ss4_v2()
1168 case 0x30: in alps_get_pkt_id_ss4_v2()
1189 f->mt[0].x = SS4_1F_X_V2(p); in alps_decode_ss4_v2()
1190 f->mt[0].y = SS4_1F_Y_V2(p); in alps_decode_ss4_v2()
1191 f->pressure = ((SS4_1F_Z_V2(p)) * 2) & 0x7f; in alps_decode_ss4_v2()
1194 * with x, y, and pressure of 0. This causes annoying jumps in alps_decode_ss4_v2()
1198 f->fingers = f->pressure > 0 ? 1 : 0; in alps_decode_ss4_v2()
1199 f->first_mp = 0; in alps_decode_ss4_v2()
1200 f->is_mp = 0; in alps_decode_ss4_v2()
1206 f->mt[0].x = SS4_PLUS_BTL_MF_X_V2(p, 0); in alps_decode_ss4_v2()
1209 f->mt[0].x = SS4_BTL_MF_X_V2(p, 0); in alps_decode_ss4_v2()
1212 f->mt[0].y = SS4_BTL_MF_Y_V2(p, 0); in alps_decode_ss4_v2()
1216 f->mt[0].x = SS4_PLUS_STD_MF_X_V2(p, 0); in alps_decode_ss4_v2()
1219 f->mt[0].x = SS4_STD_MF_X_V2(p, 0); in alps_decode_ss4_v2()
1222 f->mt[0].y = SS4_STD_MF_Y_V2(p, 0); in alps_decode_ss4_v2()
1225 f->pressure = SS4_MF_Z_V2(p, 0) ? 0x30 : 0; in alps_decode_ss4_v2()
1231 f->first_mp = 0; in alps_decode_ss4_v2()
1233 f->is_mp = 0; in alps_decode_ss4_v2()
1240 f->mt[2].x = SS4_PLUS_BTL_MF_X_V2(p, 0); in alps_decode_ss4_v2()
1244 f->mt[2].x = SS4_BTL_MF_X_V2(p, 0); in alps_decode_ss4_v2()
1250 f->mt[2].y = SS4_BTL_MF_Y_V2(p, 0); in alps_decode_ss4_v2()
1254 f->mt[2].x = SS4_PLUS_STD_MF_X_V2(p, 0); in alps_decode_ss4_v2()
1258 f->mt[2].x = SS4_STD_MF_X_V2(p, 0); in alps_decode_ss4_v2()
1264 f->mt[2].y = SS4_STD_MF_Y_V2(p, 0); in alps_decode_ss4_v2()
1268 f->first_mp = 0; in alps_decode_ss4_v2()
1275 f->mt[3].x = 0; in alps_decode_ss4_v2()
1276 f->mt[3].y = 0; in alps_decode_ss4_v2()
1288 f->first_mp = 0; in alps_decode_ss4_v2()
1289 f->is_mp = 0; in alps_decode_ss4_v2()
1294 memset(f, 0, sizeof(struct alps_fields)); in alps_decode_ss4_v2()
1300 f->ts_left = !!(SS4_BTN_V2(p) & 0x01); in alps_decode_ss4_v2()
1301 f->ts_right = !!(SS4_BTN_V2(p) & 0x02); in alps_decode_ss4_v2()
1302 f->ts_middle = !!(SS4_BTN_V2(p) & 0x04); in alps_decode_ss4_v2()
1304 f->left = !!(SS4_BTN_V2(p) & 0x01); in alps_decode_ss4_v2()
1306 f->right = !!(SS4_BTN_V2(p) & 0x02); in alps_decode_ss4_v2()
1307 f->middle = !!(SS4_BTN_V2(p) & 0x04); in alps_decode_ss4_v2()
1311 return 0; in alps_decode_ss4_v2()
1322 memset(f, 0, sizeof(struct alps_fields)); in alps_process_packet_ss4_v2()
1335 priv->multi_packet = 0; in alps_process_packet_ss4_v2()
1340 * "f.is_mp" would always be '0' after merging the 1st and 2nd packet. in alps_process_packet_ss4_v2()
1353 priv->multi_packet = 0; in alps_process_packet_ss4_v2()
1390 if (psmouse->pktcnt == 4 && ((psmouse->packet[3] & 0x08) != 0x08)) in alps_is_valid_package_ss4_v2()
1392 if (psmouse->pktcnt == 6 && ((psmouse->packet[5] & 0x10) != 0x0)) in alps_is_valid_package_ss4_v2()
1423 dev3->id.vendor = 0x0002; in alps_do_register_bare_ps2_mouse()
1425 dev3->id.version = 0x0000; in alps_do_register_bare_ps2_mouse()
1445 return 0; in alps_do_register_bare_ps2_mouse()
1489 0); in alps_report_bare_ps2_packet()
1497 packet[0] & 1, packet[0] & 2, packet[0] & 4); in alps_report_bare_ps2_packet()
1524 if (psmouse->packet[6] & 0x80) { in alps_handle_interleaved_ps2()
1534 psmouse->packet[5]) & 0x80) || in alps_handle_interleaved_ps2()
1545 psmouse->packet[0] = psmouse->packet[6]; in alps_handle_interleaved_ps2()
1551 * High bit is 0 - that means that we indeed got a PS/2 in alps_handle_interleaved_ps2()
1576 psmouse->packet[3] = psmouse->packet[6] & 0xf7; in alps_handle_interleaved_ps2()
1599 psmouse->packet[5]) & 0x80) { in alps_flush_packet()
1606 psmouse->pktcnt = 0; in alps_flush_packet()
1623 (psmouse->packet[0] & 0xc8) == 0x08) { in alps_process_byte()
1636 psmouse->pktcnt >= 4 && (psmouse->packet[3] & 0x0f) == 0x0f) { in alps_process_byte()
1640 if (!alps_is_valid_first_byte(priv, psmouse->packet[0])) { in alps_process_byte()
1642 "refusing packet[0] = %x (mask0 = %x, byte0 = %x)\n", in alps_process_byte()
1643 psmouse->packet[0], priv->mask0, priv->byte0); in alps_process_byte()
1647 /* Bytes 2 - pktsize should have 0 in the highest bit */ in alps_process_byte()
1650 (psmouse->packet[psmouse->pktcnt - 1] & 0x80)) { in alps_process_byte()
1660 * otherwise valid packet with 0xff. Given that the in alps_process_byte()
1698 BUG_ON(nibble > 0xf); in alps_command_mode_send_nibble()
1701 param = (command & 0x0f00) ? in alps_command_mode_send_nibble()
1707 return 0; in alps_command_mode_send_nibble()
1719 for (i = 12; i >= 0; i -= 4) { in alps_command_mode_set_addr()
1720 nibble = (addr >> i) & 0xf; in alps_command_mode_set_addr()
1725 return 0; in alps_command_mode_set_addr()
1741 if (addr != ((param[0] << 8) | param[1])) in __alps_command_mode_read_reg()
1756 if (alps_command_mode_send_nibble(psmouse, (value >> 4) & 0xf)) in __alps_command_mode_write_reg()
1758 if (alps_command_mode_send_nibble(psmouse, value & 0xf)) in __alps_command_mode_write_reg()
1760 return 0; in __alps_command_mode_write_reg()
1776 param[0] = 0; in alps_rpt_cmd()
1785 param[0] = param[1] = param[2] = 0xff; in alps_rpt_cmd()
1791 return 0; in alps_rpt_cmd()
1796 if (id[0] == 0x73) in alps_check_valid_firmware_id()
1799 if (id[0] == 0x88 && in alps_check_valid_firmware_id()
1800 (id[1] == 0x07 || in alps_check_valid_firmware_id()
1801 id[1] == 0x08 || in alps_check_valid_firmware_id()
1802 (id[1] & 0xf0) == 0xb0 || in alps_check_valid_firmware_id()
1803 (id[1] & 0xf0) == 0xc0)) { in alps_check_valid_firmware_id()
1814 if (alps_rpt_cmd(psmouse, 0, PSMOUSE_CMD_RESET_WRAP, param)) { in alps_enter_command_mode()
1824 return 0; in alps_enter_command_mode()
1832 return 0; in alps_exit_command_mode()
1854 return 0; in alps_passthrough_mode_v2()
1882 * e.g. when word = 0x0123, nibble send sequence is 3, 2, 1 in alps_monitor_mode_send_word()
1884 for (i = 0; i <= 8; i += 4) { in alps_monitor_mode_send_word()
1885 nibble = (word >> i) & 0xf; in alps_monitor_mode_send_word()
1890 return 0; in alps_monitor_mode_send_word()
1898 /* 0x0A0 is the command to write the word */ in alps_monitor_mode_write_reg()
1900 alps_monitor_mode_send_word(psmouse, 0x0A0) || in alps_monitor_mode_write_reg()
1906 return 0; in alps_monitor_mode_write_reg()
1930 return 0; in alps_monitor_mode()
1935 u16 reg_val = 0x181; in alps_absolute_mode_v6()
1942 ret = alps_monitor_mode_write_reg(psmouse, 0x000, reg_val); in alps_absolute_mode_v6()
1952 /* Get status: 0xF5 0xF5 0xF5 0xE9 */ in alps_get_status()
1953 if (alps_rpt_cmd(psmouse, 0, PSMOUSE_CMD_DISABLE, param)) in alps_get_status()
1956 return 0; in alps_get_status()
1961 * 0xE9 0xF5 0xF5 0xF3 0x0A to enable,
1962 * 0xE9 0xF5 0xF5 0xE8 0x00 to disable.
1963 * My guess that 0xE9 (GetInfo) is here as a sync point.
1965 * is controlled separately (0xE6 0xE6 0xE6 0xF3 0x14|0x0A) but
1972 unsigned char tap_arg = enable ? 0x0A : 0x00; in alps_tap_mode()
1984 return 0; in alps_tap_mode()
2001 PSMOUSE_CMD_POLL | (psmouse->pktsize << 8)) < 0; in alps_poll()
2006 if (poll_failed || (buf[0] & priv->mask0) != priv->byte0) in alps_poll()
2009 if ((psmouse->badbyte & 0xc8) == 0x08) { in alps_poll()
2018 return 0; in alps_poll()
2051 return 0; in alps_hw_init_v1_v2()
2057 unsigned char param[2] = {0xC8, 0x14}; in alps_trackstick_enter_extended_mode_v3_v6()
2062 ps2_command(&psmouse->ps2dev, &param[0], PSMOUSE_CMD_SETRATE) || in alps_trackstick_enter_extended_mode_v3_v6()
2066 return 0; in alps_trackstick_enter_extended_mode_v3_v6()
2090 return 0; in alps_hw_init_v6()
2104 reg_val = alps_command_mode_read_reg(psmouse, reg_base + 0x0008); in alps_passthrough_mode_v3()
2109 reg_val |= 0x01; in alps_passthrough_mode_v3()
2111 reg_val &= ~0x01; in alps_passthrough_mode_v3()
2126 reg_val = alps_command_mode_read_reg(psmouse, 0x0004); in alps_absolute_mode_v3()
2130 reg_val |= 0x06; in alps_absolute_mode_v3()
2134 return 0; in alps_absolute_mode_v3()
2144 reg_val = alps_command_mode_read_reg(psmouse, reg_base + 0x08); in alps_probe_trackstick_v3_v7()
2149 ret = reg_val & 0x80 ? 0 : -ENODEV; in alps_probe_trackstick_v3_v7()
2158 int ret = 0; in alps_setup_trackstick_v3()
2182 if (alps_rpt_cmd(psmouse, 0, PSMOUSE_CMD_SETSCALE21, param)) { in alps_setup_trackstick_v3()
2202 reg_val = alps_command_mode_read_reg(psmouse, reg_base + 0x08); in alps_setup_trackstick_v3()
2238 reg_val = alps_command_mode_read_reg(psmouse, 0x0006); in alps_hw_init_v3()
2241 if (__alps_command_mode_write_reg(psmouse, reg_val | 0x01)) in alps_hw_init_v3()
2244 reg_val = alps_command_mode_read_reg(psmouse, 0x0007); in alps_hw_init_v3()
2247 if (__alps_command_mode_write_reg(psmouse, reg_val | 0x01)) in alps_hw_init_v3()
2250 if (alps_command_mode_read_reg(psmouse, 0x0144) == -1) in alps_hw_init_v3()
2252 if (__alps_command_mode_write_reg(psmouse, 0x04)) in alps_hw_init_v3()
2255 if (alps_command_mode_read_reg(psmouse, 0x0159) == -1) in alps_hw_init_v3()
2257 if (__alps_command_mode_write_reg(psmouse, 0x03)) in alps_hw_init_v3()
2260 if (alps_command_mode_read_reg(psmouse, 0x0163) == -1) in alps_hw_init_v3()
2262 if (alps_command_mode_write_reg(psmouse, 0x0163, 0x03)) in alps_hw_init_v3()
2265 if (alps_command_mode_read_reg(psmouse, 0x0162) == -1) in alps_hw_init_v3()
2267 if (alps_command_mode_write_reg(psmouse, 0x0162, 0x04)) in alps_hw_init_v3()
2273 param[0] = 0x64; in alps_hw_init_v3()
2280 return 0; in alps_hw_init_v3()
2298 if (reg < 0) in alps_get_v3_v7_resolution()
2308 if (reg < 0) in alps_get_v3_v7_resolution()
2328 return 0; in alps_get_v3_v7_resolution()
2345 alps_command_mode_read_reg(psmouse, 0xc2d9) == -1 || in alps_hw_init_rushmore_v3()
2346 alps_command_mode_write_reg(psmouse, 0xc2cb, 0x00)) in alps_hw_init_rushmore_v3()
2349 if (alps_get_v3_v7_resolution(psmouse, 0xc2da)) in alps_hw_init_rushmore_v3()
2352 reg_val = alps_command_mode_read_reg(psmouse, 0xc2c6); in alps_hw_init_rushmore_v3()
2355 if (__alps_command_mode_write_reg(psmouse, reg_val & 0xfd)) in alps_hw_init_rushmore_v3()
2358 if (alps_command_mode_write_reg(psmouse, 0xc2c9, 0x64)) in alps_hw_init_rushmore_v3()
2362 reg_val = alps_command_mode_read_reg(psmouse, 0xc2c4); in alps_hw_init_rushmore_v3()
2365 if (__alps_command_mode_write_reg(psmouse, reg_val | 0x02)) in alps_hw_init_rushmore_v3()
2381 reg_val = alps_command_mode_read_reg(psmouse, 0x0004); in alps_absolute_mode_v4()
2385 reg_val |= 0x02; in alps_absolute_mode_v4()
2389 return 0; in alps_absolute_mode_v4()
2405 if (alps_command_mode_write_reg(psmouse, 0x0007, 0x8c)) in alps_hw_init_v4()
2408 if (alps_command_mode_write_reg(psmouse, 0x0149, 0x03)) in alps_hw_init_v4()
2411 if (alps_command_mode_write_reg(psmouse, 0x0160, 0x03)) in alps_hw_init_v4()
2414 if (alps_command_mode_write_reg(psmouse, 0x017f, 0x15)) in alps_hw_init_v4()
2417 if (alps_command_mode_write_reg(psmouse, 0x0151, 0x01)) in alps_hw_init_v4()
2420 if (alps_command_mode_write_reg(psmouse, 0x0168, 0x03)) in alps_hw_init_v4()
2423 if (alps_command_mode_write_reg(psmouse, 0x014a, 0x03)) in alps_hw_init_v4()
2426 if (alps_command_mode_write_reg(psmouse, 0x0161, 0x03)) in alps_hw_init_v4()
2436 param[0] = 0xc8; in alps_hw_init_v4()
2437 param[1] = 0x64; in alps_hw_init_v4()
2438 param[2] = 0x50; in alps_hw_init_v4()
2439 if (ps2_command(ps2dev, &param[0], PSMOUSE_CMD_SETRATE) || in alps_hw_init_v4()
2446 param[0] = 0x64; in alps_hw_init_v4()
2453 return 0; in alps_hw_init_v4()
2471 case 0: in alps_get_otp_values_ss4_v2()
2488 return 0; in alps_get_otp_values_ss4_v2()
2500 SS4PLUS_NUMSENSOR_XOFFSET + (otp[0][2] & 0x0F); in alps_update_device_area_ss4_v2()
2502 SS4PLUS_NUMSENSOR_YOFFSET + ((otp[0][2] >> 4) & 0x0F); in alps_update_device_area_ss4_v2()
2509 x_pitch = (otp[0][1] & 0x0F) + SS4PLUS_MIN_PITCH_MM; in alps_update_device_area_ss4_v2()
2510 y_pitch = ((otp[0][1] >> 4) & 0x0F) + SS4PLUS_MIN_PITCH_MM; in alps_update_device_area_ss4_v2()
2514 SS4_NUMSENSOR_XOFFSET + (otp[1][0] & 0x0F); in alps_update_device_area_ss4_v2()
2516 SS4_NUMSENSOR_YOFFSET + ((otp[1][0] >> 4) & 0x0F); in alps_update_device_area_ss4_v2()
2523 x_pitch = ((otp[1][2] >> 2) & 0x07) + SS4_MIN_PITCH_MM; in alps_update_device_area_ss4_v2()
2524 y_pitch = ((otp[1][2] >> 5) & 0x07) + SS4_MIN_PITCH_MM; in alps_update_device_area_ss4_v2()
2533 return 0; in alps_update_device_area_ss4_v2()
2542 is_btnless = (otp[1][0] >> 1) & 0x01; in alps_update_btn_info_ss4_v2()
2544 is_btnless = (otp[1][1] >> 3) & 0x01; in alps_update_btn_info_ss4_v2()
2549 return 0; in alps_update_btn_info_ss4_v2()
2557 int reg_val = 0; in alps_update_dual_info_ss4_v2()
2561 is_dual = (otp[0][0] >> 4) & 0x01; in alps_update_dual_info_ss4_v2()
2565 if (alps_exit_command_mode(psmouse) == 0 && in alps_update_dual_info_ss4_v2()
2566 alps_enter_command_mode(psmouse) == 0) { in alps_update_dual_info_ss4_v2()
2568 0xD7); in alps_update_dual_info_ss4_v2()
2573 if (reg_val == 0x0C || reg_val == 0x1D) in alps_update_dual_info_ss4_v2()
2582 return 0; in alps_update_dual_info_ss4_v2()
2590 memset(otp, 0, sizeof(otp)); in alps_set_defaults_ss4_v2()
2592 if (alps_get_otp_values_ss4_v2(psmouse, 1, &otp[1][0]) || in alps_set_defaults_ss4_v2()
2593 alps_get_otp_values_ss4_v2(psmouse, 0, &otp[0][0])) in alps_set_defaults_ss4_v2()
2602 return 0; in alps_set_defaults_ss4_v2()
2609 unsigned char param[4] = {0}; in alps_dolphin_get_device_area()
2615 param[0] = 0x0a; in alps_dolphin_get_device_area()
2619 ps2_command(ps2dev, &param[0], PSMOUSE_CMD_SETRATE) || in alps_dolphin_get_device_area()
2620 ps2_command(ps2dev, &param[0], PSMOUSE_CMD_SETRATE)) in alps_dolphin_get_device_area()
2638 num_x_electrode = DOLPHIN_PROFILE_XOFFSET + (param[2] & 0x0F); in alps_dolphin_get_device_area()
2639 num_y_electrode = DOLPHIN_PROFILE_YOFFSET + ((param[2] >> 4) & 0x0F); in alps_dolphin_get_device_area()
2648 return 0; in alps_dolphin_get_device_area()
2657 param[0] = 0x64; in alps_hw_init_dolphin_v1()
2658 param[1] = 0x28; in alps_hw_init_dolphin_v1()
2661 ps2_command(ps2dev, &param[0], PSMOUSE_CMD_SETRATE) || in alps_hw_init_dolphin_v1()
2665 return 0; in alps_hw_init_dolphin_v1()
2674 alps_command_mode_read_reg(psmouse, 0xc2d9) == -1) in alps_hw_init_v7()
2677 if (alps_get_v3_v7_resolution(psmouse, 0xc397)) in alps_hw_init_v7()
2680 if (alps_command_mode_write_reg(psmouse, 0xc2c9, 0x64)) in alps_hw_init_v7()
2683 reg_val = alps_command_mode_read_reg(psmouse, 0xc2c4); in alps_hw_init_v7()
2686 if (__alps_command_mode_write_reg(psmouse, reg_val | 0x02)) in alps_hw_init_v7()
2700 char param[2] = {0x64, 0x28}; in alps_hw_init_ss4_v2()
2706 ps2_command(ps2dev, &param[0], PSMOUSE_CMD_SETRATE) || in alps_hw_init_ss4_v2()
2714 alps_command_mode_write_reg(psmouse, 0x001D, 0x20)) { in alps_hw_init_ss4_v2()
2732 timer_setup(&priv->timer, alps_flush_packet, 0); in alps_set_protocol()
2765 ALPS_REG_BASE_PINNACLE) < 0) in alps_set_protocol()
2781 ALPS_REG_BASE_RUSHMORE) < 0) in alps_set_protocol()
2825 priv->x_max = 0xfff; in alps_set_protocol()
2826 priv->y_max = 0x7ff; in alps_set_protocol()
2828 if (priv->fw_ver[1] != 0xba) in alps_set_protocol()
2831 if (alps_probe_trackstick_v3_v7(psmouse, ALPS_REG_BASE_V7) < 0) in alps_set_protocol()
2850 return 0; in alps_set_protocol()
2859 for (i = 0; i < ARRAY_SIZE(alps_model_data); i++) { in alps_match_table()
2871 u8 param[2] = { 0 }; in alps_is_cs19_trackpoint()
2874 param, MAKE_PS2_CMD(0, 2, TP_READ_ID))) in alps_is_cs19_trackpoint()
2878 * param[0] contains the trackpoint device variant_id while in alps_is_cs19_trackpoint()
2881 * TP_VARIANT_ALPS and their firmware_ids are in 0x20~0x2f range. in alps_is_cs19_trackpoint()
2883 return param[0] == TP_VARIANT_ALPS && ((param[1] & 0xf0) == 0x20); in alps_is_cs19_trackpoint()
2894 * ALPS should return 0,0,10 or 0,0,100 if no buttons are pressed. in alps_identify()
2895 * The bits 0-2 of the first byte will be 1s if some buttons are in alps_identify()
2902 if ((e6[0] & 0xf8) != 0 || e6[1] != 0 || (e6[2] != 10 && e6[2] != 100)) in alps_identify()
2918 if (e7[0] == 0x73 && e7[1] == 0x02 && e7[2] == 0x64 && in alps_identify()
2919 ec[2] == 0x8a) { in alps_identify()
2921 } else if (e7[0] == 0x73 && e7[1] == 0x03 && e7[2] == 0x50 && in alps_identify()
2922 ec[0] == 0x73 && (ec[1] == 0x01 || ec[1] == 0x02)) { in alps_identify()
2924 } else if (ec[0] == 0x88 && in alps_identify()
2925 ((ec[1] & 0xf0) == 0xb0 || (ec[1] & 0xf0) == 0xc0)) { in alps_identify()
2927 } else if (ec[0] == 0x88 && ec[1] == 0x08) { in alps_identify()
2929 } else if (ec[0] == 0x88 && ec[1] == 0x07 && in alps_identify()
2930 ec[2] >= 0x90 && ec[2] <= 0x9d) { in alps_identify()
2932 } else if (e7[0] == 0x73 && e7[1] == 0x03 && in alps_identify()
2933 (e7[2] == 0x14 || e7[2] == 0x28)) { in alps_identify()
2935 } else if (e7[0] == 0x73 && e7[1] == 0x03 && e7[2] == 0xc8) { in alps_identify()
2957 return 0; in alps_identify()
2966 if (alps_identify(psmouse, priv) < 0) in alps_reconnect()
2988 input_set_abs_params(dev1, ABS_X, 0, priv->x_max, 0, 0); in alps_set_abs_params_st()
2989 input_set_abs_params(dev1, ABS_Y, 0, priv->y_max, 0, 0); in alps_set_abs_params_st()
2990 input_set_abs_params(dev1, ABS_PRESSURE, 0, 127, 0, 0); in alps_set_abs_params_st()
2996 input_set_abs_params(dev1, ABS_MT_POSITION_X, 0, priv->x_max, 0, 0); in alps_set_abs_params_mt_common()
2997 input_set_abs_params(dev1, ABS_MT_POSITION_Y, 0, priv->y_max, 0, 0); in alps_set_abs_params_mt_common()
3010 input_set_abs_params(dev1, ABS_PRESSURE, 0, 127, 0, 0); in alps_set_abs_params_semi_mt()
3034 input_set_abs_params(dev1, ABS_PRESSURE, 0, 127, 0, 0); in alps_set_abs_params_ss4_v2()
3117 dev2->id.vendor = 0x0002; in alps_init()
3126 input_set_abs_params(dev2, ABS_PRESSURE, 0, 127, 0, 0); in alps_init()
3159 psmouse->resync_time = 0; in alps_init()
3164 return 0; in alps_init()
3234 return 0; in alps_detect()