1 Elantech Touchpad Driver
2 ========================
4 Copyright (C) 2007-2008 Arjan Opmeer <arjan@opmeer.net>
6 Extra information for hardware version 1 found and
7 provided by Steve Havelka
9 Version 2 (EeePC) hardware support based on patches
10 received from Woody at Xandros and forwarded to me
11 by user StewieGriffin at the eeeuser.com forum
21 3.2 Native relative mode 4 byte packet format
22 3.3 Native absolute mode 4 byte packet format
25 4.2 Native absolute mode 6 byte packet format
26 4.2.1 One finger touch
27 4.2.2 Two finger touch
34 Currently the Linux Elantech touchpad driver is aware of two different
35 hardware versions unimaginatively called version 1 and version 2. Version 1
36 is found in "older" laptops and uses 4 bytes per packet. Version 2 seems to
37 be introduced with the EeePC and uses 6 bytes per packet.
39 The driver tries to support both hardware versions and should be compatible
40 with the Xorg Synaptics touchpad driver and its graphical configuration
43 Additionally the operation of the touchpad can be altered by adjusting the
44 contents of some of its internal registers. These registers are represented
45 by the driver as sysfs entries under /sys/bus/serio/drivers/psmouse/serio?
46 that can be read from and written to.
48 Currently only the registers for hardware version 1 are somewhat understood.
49 Hardware version 2 seems to use some of the same registers but it is not
50 known whether the bits in the registers represent the same thing or might
51 have changed their meaning.
53 On top of that, some register settings have effect only when the touchpad is
54 in relative mode and not in absolute mode. As the Linux Elantech touchpad
55 driver always puts the hardware into absolute mode not all information
56 mentioned below can be used immediately. But because there is no freely
57 available Elantech documentation the information is provided here anyway for
61 /////////////////////////////////////////////////////////////////////////////
67 Currently the Linux Elantech touchpad driver provides two extra knobs under
68 /sys/bus/serio/drivers/psmouse/serio? for the user.
72 Turn different levels of debugging ON or OFF.
74 By echoing "0" to this file all debugging will be turned OFF.
76 Currently a value of "1" will turn on some basic debugging and a value of
77 "2" will turn on packet debugging. For hardware version 1 the default is
78 OFF. For version 2 the default is "1".
80 Turning packet debugging on will make the driver dump every packet
81 received to the syslog before processing it. Be warned that this can
82 generate quite a lot of data!
86 Turns parity checking ON or OFF.
88 By echoing "0" to this file parity checking will be turned OFF. Any
89 non-zero value will turn it ON. For hardware version 1 the default is ON.
90 For version 2 the default it is OFF.
92 Hardware version 1 provides basic data integrity verification by
93 calculating a parity bit for the last 3 bytes of each packet. The driver
94 can check these bits and reject any packet that appears corrupted. Using
95 this knob you can bypass that check.
97 It is not known yet whether hardware version 2 provides the same parity
98 bits. Hence checking is disabled by default. Currently even turning it on
102 /////////////////////////////////////////////////////////////////////////////
105 3. Hardware version 1
111 By echoing a hexadecimal value to a register it contents can be altered.
115 echo -n 0x16 > reg_10
122 E: 1 = enable smart edges unconditionally
123 S: 1 = enable smart edges only when dragging
124 A: 1 = absolute mode (needs 4 byte packets, see reg_11)
125 L: 1 = enable drag lock (see reg_22)
126 D: 1 = disable dynamic resolution
127 T: 1 = disable tapping
128 C: 1 = enable corner tap
129 B: 1 = swap left and right button
136 P: 1 = enable parity checking for relative mode
137 F: 1 = enable native 4 byte packet mode
138 V: 1 = enable vertical scroll area
139 H: 1 = enable horizontal scroll area
147 scroll area width (small: 0x40 ... wide: 0xff)
151 drag lock time out (short: 0x14 ... long: 0xfe;
152 0xff = tap again to release)
164 smart edge cursor speed (0x02 = slow, 0x03 = medium, 0x04 = fast)
168 smart edge activation area width?
171 3.2 Native relative mode 4 byte packet format
172 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
178 L, R, M = 1 when Left, Right, Middle mouse button pressed
179 some models have M as byte 3 odd parity bit
180 when parity checking is enabled (reg_11, P = 1):
181 p1..p2 = byte 1 and 2 odd parity bit
182 c = 1 when corner tap detected
186 dx7 dx6 dx5 dx4 dx3 dx2 dx1 dx0
188 dx7..dx0 = x movement; positive = right, negative = left
189 byte 1 = 0xf0 when corner tap detected
193 dy7 dy6 dy5 dy4 dy3 dy2 dy1 dy0
195 dy7..dy0 = y movement; positive = up, negative = down
198 parity checking enabled (reg_11, P = 1):
201 w h n1 n0 ds3 ds2 ds1 ds0
204 ds3..ds0 = scroll wheel amount and direction
205 positive = down or left
206 negative = up or right
207 when corner tap detected:
208 ds0 = 1 when top right corner tapped
209 ds1 = 1 when bottom right corner tapped
210 ds2 = 1 when bottom left corner tapped
211 ds3 = 1 when top left corner tapped
212 n1..n0 = number of fingers on touchpad
213 only models with firmware 2.x report this, models with
214 firmware 1.x seem to map one, two and three finger taps
215 directly to L, M and R mouse buttons
216 h = 1 when horizontal scroll action
217 w = 1 when wide finger touch?
219 otherwise (reg_11, P = 0):
222 ds7 ds6 ds5 ds4 ds3 ds2 ds1 ds0
224 ds7..ds0 = vertical scroll amount and direction
229 3.3 Native absolute mode 4 byte packet format
230 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
233 firmware version 1.x:
238 L, R = 1 when Left, Right mouse button pressed
239 p1..p3 = byte 1..3 odd parity bit
240 D, U = 1 when rocker switch pressed Up, Down
242 firmware version 2.x:
247 L, R = 1 when Left, Right mouse button pressed
248 p1..p3 = byte 1..3 odd parity bit
249 n1..n0 = number of fingers on touchpad
252 firmware version 1.x:
255 f 0 th tw x9 x8 y9 y8
257 tw = 1 when two finger touch
258 th = 1 when three finger touch
259 f = 1 when finger touch
261 firmware version 2.x:
268 x7 x6 x5 x4 x3 x2 x1 x0
270 x9..x0 = absolute x value (horizontal)
274 y7 y6 y5 y4 y3 y2 y1 y0
276 y9..y0 = absolute y value (vertical)
279 /////////////////////////////////////////////////////////////////////////////
282 4. Hardware version 2
289 By echoing a hexadecimal value to a register it contents can be altered.
293 echo -n 0x56 > reg_10
300 D: 1 = enable drag and drop
307 S: 1 = enable vertical scroll
315 drag and drop release time out (short: 0x70 ... long 0x7e;
316 0x7f = never i.e. tap again to release)
319 4.2 Native absolute mode 6 byte packet format
320 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
322 4.2.1 One finger touch
330 L, R = 1 when Left, Right mouse button pressed
331 n1..n0 = numbers of fingers on touchpad
336 x15 x14 x13 x12 x11 x10 x9 x8
341 x7 x6 x5 x4 x4 x2 x1 x0
343 x15..x0 = absolute x value (horizontal)
353 y15 y14 y13 y12 y11 y10 y8 y8
358 y7 y6 y5 y4 y3 y2 y1 y0
360 y15..y0 = absolute y value (vertical)
363 4.2.2 Two finger touch
369 n1 n0 ay8 ax8 . . R L
371 L, R = 1 when Left, Right mouse button pressed
372 n1..n0 = numbers of fingers on touchpad
377 ax7 ax6 ax5 ax4 ax3 ax2 ax1 ax0
379 ax8..ax0 = first finger absolute x value
384 ay7 ay6 ay5 ay4 ay3 ay2 ay1 ay0
386 ay8..ay0 = first finger absolute y value
396 bx7 bx6 bx5 bx4 bx3 bx2 bx1 bx0
398 bx8..bx0 = second finger absolute x value
403 by7 by8 by5 by4 by3 by2 by1 by0
405 by8..by0 = second finger absolute y value