1 |
From a34eb0a8a5c5f14c26bb9ff076a0648cffe1423f Mon Sep 17 00:00:00 2001 |
2 |
From: Seth Forshee <seth.forshee@canonical.com> |
3 |
Date: Wed, 14 Sep 2011 11:40:37 -0500 |
4 |
Subject: [PATCH 1/8] Input: ALPS - Move protocol information to Documentation |
5 |
|
6 |
In preparation for new protocol support, move the protocol |
7 |
information currently documented in alps.c to |
8 |
Documentation/input/alps.txt, where it can be expanded without |
9 |
cluttering up the driver. |
10 |
|
11 |
Signed-off-by: Seth Forshee <seth.forshee@canonical.com> |
12 |
--- |
13 |
Documentation/input/alps.txt | 75 ++++++++++++++++++++++++++++++++++++++++++ |
14 |
drivers/input/mouse/alps.c | 37 +-------------------- |
15 |
2 files changed, 76 insertions(+), 36 deletions(-) |
16 |
create mode 100644 Documentation/input/alps.txt |
17 |
|
18 |
diff --git a/Documentation/input/alps.txt b/Documentation/input/alps.txt |
19 |
new file mode 100644 |
20 |
index 0000000..e88c921 |
21 |
--- /dev/null |
22 |
+++ b/Documentation/input/alps.txt |
23 |
@@ -0,0 +1,75 @@ |
24 |
+ALPS Touchpad Protocol |
25 |
+---------------------- |
26 |
+ |
27 |
+Introduction |
28 |
+------------ |
29 |
+ |
30 |
+Currently the ALPS touchpad driver supports two protocol versions in use by |
31 |
+ALPS touchpads, the "old" and "new" protocol versions. Fundamentally these |
32 |
+differ only in the format of their event packets (in reality many features may |
33 |
+be found on new protocol devices that aren't found on the old protocol |
34 |
+devices, but these are handled transparently as feature differences rather |
35 |
+than protocol differences). |
36 |
+ |
37 |
+Detection |
38 |
+--------- |
39 |
+ |
40 |
+All ALPS touchpads should respond to the "E6 report" command sequence: |
41 |
+E8-E6-E6-E6-E9. An ALPS touchpad should respond with either 00-00-0A or |
42 |
+00-00-64. |
43 |
+ |
44 |
+If the E6 report is successful, the touchpad model is identified using the "E7 |
45 |
+report" sequence: E8-E7-E7-E7-E9. The response is the model signature and is |
46 |
+matched against known models in the alps_model_data_array. |
47 |
+ |
48 |
+Packet Format |
49 |
+------------- |
50 |
+ |
51 |
+In the following tables, the following notation us used. |
52 |
+ |
53 |
+ CAPITALS = stick, miniscules = touchpad |
54 |
+ |
55 |
+?'s can have different meanings on different models, such as wheel rotation, |
56 |
+extra buttons, stick buttons on a dualpoint, etc. |
57 |
+ |
58 |
+PS/2 packet format |
59 |
+------------------ |
60 |
+ |
61 |
+ byte 0: 0 0 YSGN XSGN 1 M R L |
62 |
+ byte 1: X7 X6 X5 X4 X3 X2 X1 X0 |
63 |
+ byte 2: Y7 Y6 Y5 Y4 Y3 Y2 Y1 Y0 |
64 |
+ |
65 |
+Note that the device never signals overflow condition. |
66 |
+ |
67 |
+ALPS Absolute Mode - Old Format |
68 |
+------------------------------- |
69 |
+ |
70 |
+ byte 0: 1 0 0 0 1 x9 x8 x7 |
71 |
+ byte 1: 0 x6 x5 x4 x3 x2 x1 x0 |
72 |
+ byte 2: 0 ? ? l r ? fin ges |
73 |
+ byte 3: 0 ? ? ? ? y9 y8 y7 |
74 |
+ byte 4: 0 y6 y5 y4 y3 y2 y1 y0 |
75 |
+ byte 5: 0 z6 z5 z4 z3 z2 z1 z0 |
76 |
+ |
77 |
+ALPS Absolute Mode - New Format |
78 |
+------------------------------- |
79 |
+ |
80 |
+ byte 0: 1 ? ? ? 1 ? ? ? |
81 |
+ byte 1: 0 x6 x5 x4 x3 x2 x1 x0 |
82 |
+ byte 2: 0 x10 x9 x8 x7 ? fin ges |
83 |
+ byte 3: 0 y9 y8 y7 1 M R L |
84 |
+ byte 4: 0 y6 y5 y4 y3 y2 y1 y0 |
85 |
+ byte 5: 0 z6 z5 z4 z3 z2 z1 z0 |
86 |
+ |
87 |
+Dualpoint device -- interleaved packet format |
88 |
+--------------------------------------------- |
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 |
diff --git a/drivers/input/mouse/alps.c b/drivers/input/mouse/alps.c |
100 |
index 99d5876..ad15e7c 100644 |
101 |
--- a/drivers/input/mouse/alps.c |
102 |
+++ b/drivers/input/mouse/alps.c |
103 |
@@ -74,42 +74,7 @@ static const struct alps_model_info alps_model_data[] = { |
104 |
* isn't valid per PS/2 spec. |
105 |
*/ |
106 |
|
107 |
-/* |
108 |
- * PS/2 packet format |
109 |
- * |
110 |
- * byte 0: 0 0 YSGN XSGN 1 M R L |
111 |
- * byte 1: X7 X6 X5 X4 X3 X2 X1 X0 |
112 |
- * byte 2: Y7 Y6 Y5 Y4 Y3 Y2 Y1 Y0 |
113 |
- * |
114 |
- * Note that the device never signals overflow condition. |
115 |
- * |
116 |
- * ALPS absolute Mode - new format |
117 |
- * |
118 |
- * byte 0: 1 ? ? ? 1 ? ? ? |
119 |
- * byte 1: 0 x6 x5 x4 x3 x2 x1 x0 |
120 |
- * byte 2: 0 x10 x9 x8 x7 ? fin ges |
121 |
- * byte 3: 0 y9 y8 y7 1 M R L |
122 |
- * byte 4: 0 y6 y5 y4 y3 y2 y1 y0 |
123 |
- * byte 5: 0 z6 z5 z4 z3 z2 z1 z0 |
124 |
- * |
125 |
- * Dualpoint device -- interleaved packet format |
126 |
- * |
127 |
- * byte 0: 1 1 0 0 1 1 1 1 |
128 |
- * byte 1: 0 x6 x5 x4 x3 x2 x1 x0 |
129 |
- * byte 2: 0 x10 x9 x8 x7 0 fin ges |
130 |
- * byte 3: 0 0 YSGN XSGN 1 1 1 1 |
131 |
- * byte 4: X7 X6 X5 X4 X3 X2 X1 X0 |
132 |
- * byte 5: Y7 Y6 Y5 Y4 Y3 Y2 Y1 Y0 |
133 |
- * byte 6: 0 y9 y8 y7 1 m r l |
134 |
- * byte 7: 0 y6 y5 y4 y3 y2 y1 y0 |
135 |
- * byte 8: 0 z6 z5 z4 z3 z2 z1 z0 |
136 |
- * |
137 |
- * CAPITALS = stick, miniscules = touchpad |
138 |
- * |
139 |
- * ?'s can have different meanings on different models, |
140 |
- * such as wheel rotation, extra buttons, stick buttons |
141 |
- * on a dualpoint, etc. |
142 |
- */ |
143 |
+/* Packet formats are described in Documentation/input/alps.txt */ |
144 |
|
145 |
static bool alps_is_valid_first_byte(const struct alps_model_info *model, |
146 |
unsigned char data) |
147 |
-- |
148 |
1.7.4.1 |
149 |
|