Skip to content

Commit d4b347b

Browse files
Seth Forsheedtor
authored andcommitted
Input: ALPS - move protocol information to Documentation
In preparation for new protocol support, move the protocol information currently documented in alps.c to Documentation/input/alps.txt, where it can be expanded without cluttering up the driver. Signed-off-by: Seth Forshee <seth.forshee@canonical.com> Acked-by: Chase Douglas <chase.douglas@canonical.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
1 parent 5a6c865 commit d4b347b

2 files changed

Lines changed: 76 additions & 36 deletions

File tree

‎Documentation/input/alps.txt‎

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
ALPS Touchpad Protocol
2+
----------------------
3+
4+
Introduction
5+
------------
6+
7+
Currently the ALPS touchpad driver supports two protocol versions in use by
8+
ALPS touchpads, the "old" and "new" protocol versions. Fundamentally these
9+
differ only in the format of their event packets (in reality many features may
10+
be found on new protocol devices that aren't found on the old protocol
11+
devices, but these are handled transparently as feature differences rather
12+
than protocol differences).
13+
14+
Detection
15+
---------
16+
17+
All ALPS touchpads should respond to the "E6 report" command sequence:
18+
E8-E6-E6-E6-E9. An ALPS touchpad should respond with either 00-00-0A or
19+
00-00-64.
20+
21+
If the E6 report is successful, the touchpad model is identified using the "E7
22+
report" sequence: E8-E7-E7-E7-E9. The response is the model signature and is
23+
matched against known models in the alps_model_data_array.
24+
25+
Packet Format
26+
-------------
27+
28+
In the following tables, the following notation us used.
29+
30+
CAPITALS = stick, miniscules = touchpad
31+
32+
?'s can have different meanings on different models, such as wheel rotation,
33+
extra buttons, stick buttons on a dualpoint, etc.
34+
35+
PS/2 packet format
36+
------------------
37+
38+
byte 0: 0 0 YSGN XSGN 1 M R L
39+
byte 1: X7 X6 X5 X4 X3 X2 X1 X0
40+
byte 2: Y7 Y6 Y5 Y4 Y3 Y2 Y1 Y0
41+
42+
Note that the device never signals overflow condition.
43+
44+
ALPS Absolute Mode - Old Format
45+
-------------------------------
46+
47+
byte 0: 1 0 0 0 1 x9 x8 x7
48+
byte 1: 0 x6 x5 x4 x3 x2 x1 x0
49+
byte 2: 0 ? ? l r ? fin ges
50+
byte 3: 0 ? ? ? ? y9 y8 y7
51+
byte 4: 0 y6 y5 y4 y3 y2 y1 y0
52+
byte 5: 0 z6 z5 z4 z3 z2 z1 z0
53+
54+
ALPS Absolute Mode - New Format
55+
-------------------------------
56+
57+
byte 0: 1 ? ? ? 1 ? ? ?
58+
byte 1: 0 x6 x5 x4 x3 x2 x1 x0
59+
byte 2: 0 x10 x9 x8 x7 ? fin ges
60+
byte 3: 0 y9 y8 y7 1 M R L
61+
byte 4: 0 y6 y5 y4 y3 y2 y1 y0
62+
byte 5: 0 z6 z5 z4 z3 z2 z1 z0
63+
64+
Dualpoint device -- interleaved packet format
65+
---------------------------------------------
66+
67+
byte 0: 1 1 0 0 1 1 1 1
68+
byte 1: 0 x6 x5 x4 x3 x2 x1 x0
69+
byte 2: 0 x10 x9 x8 x7 0 fin ges
70+
byte 3: 0 0 YSGN XSGN 1 1 1 1
71+
byte 4: X7 X6 X5 X4 X3 X2 X1 X0
72+
byte 5: Y7 Y6 Y5 Y4 Y3 Y2 Y1 Y0
73+
byte 6: 0 y9 y8 y7 1 m r l
74+
byte 7: 0 y6 y5 y4 y3 y2 y1 y0
75+
byte 8: 0 z6 z5 z4 z3 z2 z1 z0

‎drivers/input/mouse/alps.c‎

Lines changed: 1 addition & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -67,42 +67,7 @@ static const struct alps_model_info alps_model_data[] = {
6767
* isn't valid per PS/2 spec.
6868
*/
6969

70-
/*
71-
* PS/2 packet format
72-
*
73-
* byte 0: 0 0 YSGN XSGN 1 M R L
74-
* byte 1: X7 X6 X5 X4 X3 X2 X1 X0
75-
* byte 2: Y7 Y6 Y5 Y4 Y3 Y2 Y1 Y0
76-
*
77-
* Note that the device never signals overflow condition.
78-
*
79-
* ALPS absolute Mode - new format
80-
*
81-
* byte 0: 1 ? ? ? 1 ? ? ?
82-
* byte 1: 0 x6 x5 x4 x3 x2 x1 x0
83-
* byte 2: 0 x10 x9 x8 x7 ? fin ges
84-
* byte 3: 0 y9 y8 y7 1 M R L
85-
* byte 4: 0 y6 y5 y4 y3 y2 y1 y0
86-
* byte 5: 0 z6 z5 z4 z3 z2 z1 z0
87-
*
88-
* Dualpoint device -- interleaved packet format
89-
*
90-
* byte 0: 1 1 0 0 1 1 1 1
91-
* byte 1: 0 x6 x5 x4 x3 x2 x1 x0
92-
* byte 2: 0 x10 x9 x8 x7 0 fin ges
93-
* byte 3: 0 0 YSGN XSGN 1 1 1 1
94-
* byte 4: X7 X6 X5 X4 X3 X2 X1 X0
95-
* byte 5: Y7 Y6 Y5 Y4 Y3 Y2 Y1 Y0
96-
* byte 6: 0 y9 y8 y7 1 m r l
97-
* byte 7: 0 y6 y5 y4 y3 y2 y1 y0
98-
* byte 8: 0 z6 z5 z4 z3 z2 z1 z0
99-
*
100-
* CAPITALS = stick, miniscules = touchpad
101-
*
102-
* ?'s can have different meanings on different models,
103-
* such as wheel rotation, extra buttons, stick buttons
104-
* on a dualpoint, etc.
105-
*/
70+
/* Packet formats are described in Documentation/input/alps.txt */
10671

10772
static bool alps_is_valid_first_byte(const struct alps_model_info *model,
10873
unsigned char data)

0 commit comments

Comments
 (0)