aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation/input
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@s-opensource.com>2017-04-04 20:38:54 -0400
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2017-04-05 18:44:13 -0400
commit604aed61303b88fdf67e56c338d950fe4a8da5c2 (patch)
tree01a5c9c70dfd80ff4a894d35df6848e73943baea /Documentation/input
parentc87d64654da1ea64bafc38020c9453ba28fa086d (diff)
Input: elantech - convert documentation into ReST format
This file require minimum adjustments to be a valid ReST file. Do it, in order to be able to parse it with Sphinx. We opted to remove section numbers, as this can be automatically generated on Sphinx, by using :numbered: tag at index. Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Diffstat (limited to 'Documentation/input')
-rw-r--r--Documentation/input/elantech.txt306
1 files changed, 165 insertions, 141 deletions
diff --git a/Documentation/input/elantech.txt b/Documentation/input/elantech.txt
index 1ec0db7879d3..c3374a7ce7af 100644
--- a/Documentation/input/elantech.txt
+++ b/Documentation/input/elantech.txt
@@ -10,9 +10,7 @@ Elantech Touchpad Driver
10 received from Woody at Xandros and forwarded to me 10 received from Woody at Xandros and forwarded to me
11 by user StewieGriffin at the eeeuser.com forum 11 by user StewieGriffin at the eeeuser.com forum
12 12
13 13.. Contents
14Contents
15~~~~~~~~
16 14
17 1. Introduction 15 1. Introduction
18 2. Extra knobs 16 2. Extra knobs
@@ -45,8 +43,8 @@ Contents
45 43
46 44
47 45
481. Introduction 46Introduction
49 ~~~~~~~~~~~~ 47~~~~~~~~~~~~
50 48
51Currently the Linux Elantech touchpad driver is aware of four different 49Currently the Linux Elantech touchpad driver is aware of four different
52hardware versions unimaginatively called version 1,version 2, version 3 50hardware versions unimaginatively called version 1,version 2, version 3
@@ -88,11 +86,8 @@ available Elantech documentation the information is provided here anyway for
88completeness sake. 86completeness sake.
89 87
90 88
91///////////////////////////////////////////////////////////////////////////// 89Extra knobs
92 90~~~~~~~~~~~
93
942. Extra knobs
95 ~~~~~~~~~~~
96 91
97Currently the Linux Elantech touchpad driver provides three extra knobs under 92Currently the Linux Elantech touchpad driver provides three extra knobs under
98/sys/bus/serio/drivers/psmouse/serio? for the user. 93/sys/bus/serio/drivers/psmouse/serio? for the user.
@@ -142,18 +137,17 @@ Currently the Linux Elantech touchpad driver provides three extra knobs under
142 Reading the crc_enabled value will show the active value. Echoing 137 Reading the crc_enabled value will show the active value. Echoing
143 "0" or "1" to this file will set the state to "0" or "1". 138 "0" or "1" to this file will set the state to "0" or "1".
144 139
145///////////////////////////////////////////////////////////////////////////// 140Differentiating hardware versions
141~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
146 142
1473. Differentiating hardware versions 143To detect the hardware version, read the version number as param[0].param[1].param[2]::
148 =================================
149
150To detect the hardware version, read the version number as param[0].param[1].param[2]
151 144
152 4 bytes version: (after the arrow is the name given in the Dell-provided driver) 145 4 bytes version: (after the arrow is the name given in the Dell-provided driver)
153 02.00.22 => EF013 146 02.00.22 => EF013
154 02.06.00 => EF019 147 02.06.00 => EF019
148
155In the wild, there appear to be more versions, such as 00.01.64, 01.00.21, 149In the wild, there appear to be more versions, such as 00.01.64, 01.00.21,
15602.00.00, 02.00.04, 02.00.06. 15002.00.00, 02.00.04, 02.00.06::
157 151
158 6 bytes: 152 6 bytes:
159 02.00.30 => EF113 153 02.00.30 => EF113
@@ -162,6 +156,7 @@ In the wild, there appear to be more versions, such as 00.01.64, 01.00.21,
162 02.0B.00 => EF215 156 02.0B.00 => EF215
163 04.01.XX => Scroll_EF051 157 04.01.XX => Scroll_EF051
164 04.02.XX => EF051 158 04.02.XX => EF051
159
165In the wild, there appear to be more versions, such as 04.03.01, 04.04.11. There 160In the wild, there appear to be more versions, such as 04.03.01, 04.04.11. There
166appears to be almost no difference, except for EF113, which does not report 161appears to be almost no difference, except for EF113, which does not report
167pressure/width and has different data consistency checks. 162pressure/width and has different data consistency checks.
@@ -170,21 +165,20 @@ Probably all the versions with param[0] <= 01 can be considered as
1704 bytes/firmware 1. The versions < 02.08.00, with the exception of 02.00.30, as 1654 bytes/firmware 1. The versions < 02.08.00, with the exception of 02.00.30, as
1714 bytes/firmware 2. Everything >= 02.08.00 can be considered as 6 bytes. 1664 bytes/firmware 2. Everything >= 02.08.00 can be considered as 6 bytes.
172 167
173/////////////////////////////////////////////////////////////////////////////
174 168
1754. Hardware version 1 169Hardware version 1
176 ================== 170~~~~~~~~~~~~~~~~~~
177 171
1784.1 Registers 172Registers
179 ~~~~~~~~~ 173---------
180 174
181By echoing a hexadecimal value to a register it contents can be altered. 175By echoing a hexadecimal value to a register it contents can be altered.
182 176
183For example: 177For example::
184 178
185 echo -n 0x16 > reg_10 179 echo -n 0x16 > reg_10
186 180
187* reg_10 181* reg_10::
188 182
189 bit 7 6 5 4 3 2 1 0 183 bit 7 6 5 4 3 2 1 0
190 B C T D L A S E 184 B C T D L A S E
@@ -198,7 +192,7 @@ For example:
198 C: 1 = enable corner tap 192 C: 1 = enable corner tap
199 B: 1 = swap left and right button 193 B: 1 = swap left and right button
200 194
201* reg_11 195* reg_11::
202 196
203 bit 7 6 5 4 3 2 1 0 197 bit 7 6 5 4 3 2 1 0
204 1 0 0 H V 1 F P 198 1 0 0 H V 1 F P
@@ -208,40 +202,41 @@ For example:
208 V: 1 = enable vertical scroll area 202 V: 1 = enable vertical scroll area
209 H: 1 = enable horizontal scroll area 203 H: 1 = enable horizontal scroll area
210 204
211* reg_20 205* reg_20::
212 206
213 single finger width? 207 single finger width?
214 208
215* reg_21 209* reg_21::
216 210
217 scroll area width (small: 0x40 ... wide: 0xff) 211 scroll area width (small: 0x40 ... wide: 0xff)
218 212
219* reg_22 213* reg_22::
220 214
221 drag lock time out (short: 0x14 ... long: 0xfe; 215 drag lock time out (short: 0x14 ... long: 0xfe;
222 0xff = tap again to release) 216 0xff = tap again to release)
223 217
224* reg_23 218* reg_23::
225 219
226 tap make timeout? 220 tap make timeout?
227 221
228* reg_24 222* reg_24::
229 223
230 tap release timeout? 224 tap release timeout?
231 225
232* reg_25 226* reg_25::
233 227
234 smart edge cursor speed (0x02 = slow, 0x03 = medium, 0x04 = fast) 228 smart edge cursor speed (0x02 = slow, 0x03 = medium, 0x04 = fast)
235 229
236* reg_26 230* reg_26::
237 231
238 smart edge activation area width? 232 smart edge activation area width?
239 233
240 234
2414.2 Native relative mode 4 byte packet format 235Native relative mode 4 byte packet format
242 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 236-----------------------------------------
237
238byte 0::
243 239
244byte 0:
245 bit 7 6 5 4 3 2 1 0 240 bit 7 6 5 4 3 2 1 0
246 c c p2 p1 1 M R L 241 c c p2 p1 1 M R L
247 242
@@ -251,20 +246,23 @@ byte 0:
251 p1..p2 = byte 1 and 2 odd parity bit 246 p1..p2 = byte 1 and 2 odd parity bit
252 c = 1 when corner tap detected 247 c = 1 when corner tap detected
253 248
254byte 1: 249byte 1::
250
255 bit 7 6 5 4 3 2 1 0 251 bit 7 6 5 4 3 2 1 0
256 dx7 dx6 dx5 dx4 dx3 dx2 dx1 dx0 252 dx7 dx6 dx5 dx4 dx3 dx2 dx1 dx0
257 253
258 dx7..dx0 = x movement; positive = right, negative = left 254 dx7..dx0 = x movement; positive = right, negative = left
259 byte 1 = 0xf0 when corner tap detected 255 byte 1 = 0xf0 when corner tap detected
260 256
261byte 2: 257byte 2::
258
262 bit 7 6 5 4 3 2 1 0 259 bit 7 6 5 4 3 2 1 0
263 dy7 dy6 dy5 dy4 dy3 dy2 dy1 dy0 260 dy7 dy6 dy5 dy4 dy3 dy2 dy1 dy0
264 261
265 dy7..dy0 = y movement; positive = up, negative = down 262 dy7..dy0 = y movement; positive = up, negative = down
266 263
267byte 3: 264byte 3::
265
268 parity checking enabled (reg_11, P = 1): 266 parity checking enabled (reg_11, P = 1):
269 267
270 bit 7 6 5 4 3 2 1 0 268 bit 7 6 5 4 3 2 1 0
@@ -296,14 +294,15 @@ byte 3:
296 positive = down 294 positive = down
297 295
298 296
2994.3 Native absolute mode 4 byte packet format 297Native absolute mode 4 byte packet format
300 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 298-----------------------------------------
301 299
302EF013 and EF019 have a special behaviour (due to a bug in the firmware?), and 300EF013 and EF019 have a special behaviour (due to a bug in the firmware?), and
303when 1 finger is touching, the first 2 position reports must be discarded. 301when 1 finger is touching, the first 2 position reports must be discarded.
304This counting is reset whenever a different number of fingers is reported. 302This counting is reset whenever a different number of fingers is reported.
305 303
306byte 0: 304byte 0::
305
307 firmware version 1.x: 306 firmware version 1.x:
308 307
309 bit 7 6 5 4 3 2 1 0 308 bit 7 6 5 4 3 2 1 0
@@ -322,7 +321,8 @@ byte 0:
322 p1..p3 = byte 1..3 odd parity bit 321 p1..p3 = byte 1..3 odd parity bit
323 n1..n0 = number of fingers on touchpad 322 n1..n0 = number of fingers on touchpad
324 323
325byte 1: 324byte 1::
325
326 firmware version 1.x: 326 firmware version 1.x:
327 327
328 bit 7 6 5 4 3 2 1 0 328 bit 7 6 5 4 3 2 1 0
@@ -337,65 +337,68 @@ byte 1:
337 bit 7 6 5 4 3 2 1 0 337 bit 7 6 5 4 3 2 1 0
338 . . . . x9 x8 y9 y8 338 . . . . x9 x8 y9 y8
339 339
340byte 2: 340byte 2::
341
341 bit 7 6 5 4 3 2 1 0 342 bit 7 6 5 4 3 2 1 0
342 x7 x6 x5 x4 x3 x2 x1 x0 343 x7 x6 x5 x4 x3 x2 x1 x0
343 344
344 x9..x0 = absolute x value (horizontal) 345 x9..x0 = absolute x value (horizontal)
345 346
346byte 3: 347byte 3::
348
347 bit 7 6 5 4 3 2 1 0 349 bit 7 6 5 4 3 2 1 0
348 y7 y6 y5 y4 y3 y2 y1 y0 350 y7 y6 y5 y4 y3 y2 y1 y0
349 351
350 y9..y0 = absolute y value (vertical) 352 y9..y0 = absolute y value (vertical)
351 353
352 354
353///////////////////////////////////////////////////////////////////////////// 355Hardware version 2
354 356~~~~~~~~~~~~~~~~~~
355 357
3565. Hardware version 2
357 ==================
358 358
359 359Registers
3605.1 Registers 360---------
361 ~~~~~~~~~
362 361
363By echoing a hexadecimal value to a register it contents can be altered. 362By echoing a hexadecimal value to a register it contents can be altered.
364 363
365For example: 364For example::
366 365
367 echo -n 0x56 > reg_10 366 echo -n 0x56 > reg_10
368 367
369* reg_10 368* reg_10::
370 369
371 bit 7 6 5 4 3 2 1 0 370 bit 7 6 5 4 3 2 1 0
372 0 1 0 1 0 1 D 0 371 0 1 0 1 0 1 D 0
373 372
374 D: 1 = enable drag and drop 373 D: 1 = enable drag and drop
375 374
376* reg_11 375* reg_11::
377 376
378 bit 7 6 5 4 3 2 1 0 377 bit 7 6 5 4 3 2 1 0
379 1 0 0 0 S 0 1 0 378 1 0 0 0 S 0 1 0
380 379
381 S: 1 = enable vertical scroll 380 S: 1 = enable vertical scroll
382 381
383* reg_21 382* reg_21::
384 383
385 unknown (0x00) 384 unknown (0x00)
386 385
387* reg_22 386* reg_22::
388 387
389 drag and drop release time out (short: 0x70 ... long 0x7e; 388 drag and drop release time out (short: 0x70 ... long 0x7e;
390 0x7f = never i.e. tap again to release) 389 0x7f = never i.e. tap again to release)
391 390
392 391
3935.2 Native absolute mode 6 byte packet format 392Native absolute mode 6 byte packet format
394 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 393-----------------------------------------
3955.2.1 Parity checking and packet re-synchronization 394
395Parity checking and packet re-synchronization
396^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
397
396There is no parity checking, however some consistency checks can be performed. 398There is no parity checking, however some consistency checks can be performed.
397 399
398For instance for EF113: 400For instance for EF113::
401
399 SA1= packet[0]; 402 SA1= packet[0];
400 A1 = packet[1]; 403 A1 = packet[1];
401 B1 = packet[2]; 404 B1 = packet[2];
@@ -410,7 +413,8 @@ For instance for EF113:
410 (((SA1 & 0xC0) != 0x80) && (( C1 & 0xF0) != 0x00)) ) // check Byte 5 413 (((SA1 & 0xC0) != 0x80) && (( C1 & 0xF0) != 0x00)) ) // check Byte 5
411 // error detected 414 // error detected
412 415
413For all the other ones, there are just a few constant bits: 416For all the other ones, there are just a few constant bits::
417
414 if( ((packet[0] & 0x0C) != 0x04) || 418 if( ((packet[0] & 0x0C) != 0x04) ||
415 ((packet[3] & 0x0f) != 0x02) ) 419 ((packet[3] & 0x0f) != 0x02) )
416 // error detected 420 // error detected
@@ -418,10 +422,10 @@ For all the other ones, there are just a few constant bits:
418 422
419In case an error is detected, all the packets are shifted by one (and packet[0] is discarded). 423In case an error is detected, all the packets are shifted by one (and packet[0] is discarded).
420 424
4215.2.2 One/Three finger touch 425One/Three finger touch
422 ~~~~~~~~~~~~~~~~ 426^^^^^^^^^^^^^^^^^^^^^^
423 427
424byte 0: 428byte 0::
425 429
426 bit 7 6 5 4 3 2 1 0 430 bit 7 6 5 4 3 2 1 0
427 n1 n0 w3 w2 . . R L 431 n1 n0 w3 w2 . . R L
@@ -429,19 +433,19 @@ byte 0:
429 L, R = 1 when Left, Right mouse button pressed 433 L, R = 1 when Left, Right mouse button pressed
430 n1..n0 = number of fingers on touchpad 434 n1..n0 = number of fingers on touchpad
431 435
432byte 1: 436byte 1::
433 437
434 bit 7 6 5 4 3 2 1 0 438 bit 7 6 5 4 3 2 1 0
435 p7 p6 p5 p4 x11 x10 x9 x8 439 p7 p6 p5 p4 x11 x10 x9 x8
436 440
437byte 2: 441byte 2::
438 442
439 bit 7 6 5 4 3 2 1 0 443 bit 7 6 5 4 3 2 1 0
440 x7 x6 x5 x4 x3 x2 x1 x0 444 x7 x6 x5 x4 x3 x2 x1 x0
441 445
442 x11..x0 = absolute x value (horizontal) 446 x11..x0 = absolute x value (horizontal)
443 447
444byte 3: 448byte 3::
445 449
446 bit 7 6 5 4 3 2 1 0 450 bit 7 6 5 4 3 2 1 0
447 n4 vf w1 w0 . . . b2 451 n4 vf w1 w0 . . . b2
@@ -460,14 +464,14 @@ byte 3:
460 6 = Another one 464 6 = Another one
461 7 = Another one 465 7 = Another one
462 466
463byte 4: 467byte 4::
464 468
465 bit 7 6 5 4 3 2 1 0 469 bit 7 6 5 4 3 2 1 0
466 p3 p1 p2 p0 y11 y10 y9 y8 470 p3 p1 p2 p0 y11 y10 y9 y8
467 471
468 p7..p0 = pressure (not EF113) 472 p7..p0 = pressure (not EF113)
469 473
470byte 5: 474byte 5::
471 475
472 bit 7 6 5 4 3 2 1 0 476 bit 7 6 5 4 3 2 1 0
473 y7 y6 y5 y4 y3 y2 y1 y0 477 y7 y6 y5 y4 y3 y2 y1 y0
@@ -475,15 +479,15 @@ byte 5:
475 y11..y0 = absolute y value (vertical) 479 y11..y0 = absolute y value (vertical)
476 480
477 481
4785.2.3 Two finger touch 482Two finger touch
479 ~~~~~~~~~~~~~~~~ 483^^^^^^^^^^^^^^^^
480 484
481Note that the two pairs of coordinates are not exactly the coordinates of the 485Note that the two pairs of coordinates are not exactly the coordinates of the
482two fingers, but only the pair of the lower-left and upper-right coordinates. 486two fingers, but only the pair of the lower-left and upper-right coordinates.
483So the actual fingers might be situated on the other diagonal of the square 487So the actual fingers might be situated on the other diagonal of the square
484defined by these two points. 488defined by these two points.
485 489
486byte 0: 490byte 0::
487 491
488 bit 7 6 5 4 3 2 1 0 492 bit 7 6 5 4 3 2 1 0
489 n1 n0 ay8 ax8 . . R L 493 n1 n0 ay8 ax8 . . R L
@@ -491,47 +495,46 @@ byte 0:
491 L, R = 1 when Left, Right mouse button pressed 495 L, R = 1 when Left, Right mouse button pressed
492 n1..n0 = number of fingers on touchpad 496 n1..n0 = number of fingers on touchpad
493 497
494byte 1: 498byte 1::
495 499
496 bit 7 6 5 4 3 2 1 0 500 bit 7 6 5 4 3 2 1 0
497 ax7 ax6 ax5 ax4 ax3 ax2 ax1 ax0 501 ax7 ax6 ax5 ax4 ax3 ax2 ax1 ax0
498 502
499 ax8..ax0 = lower-left finger absolute x value 503 ax8..ax0 = lower-left finger absolute x value
500 504
501byte 2: 505byte 2::
502 506
503 bit 7 6 5 4 3 2 1 0 507 bit 7 6 5 4 3 2 1 0
504 ay7 ay6 ay5 ay4 ay3 ay2 ay1 ay0 508 ay7 ay6 ay5 ay4 ay3 ay2 ay1 ay0
505 509
506 ay8..ay0 = lower-left finger absolute y value 510 ay8..ay0 = lower-left finger absolute y value
507 511
508byte 3: 512byte 3::
509 513
510 bit 7 6 5 4 3 2 1 0 514 bit 7 6 5 4 3 2 1 0
511 . . by8 bx8 . . . . 515 . . by8 bx8 . . . .
512 516
513byte 4: 517byte 4::
514 518
515 bit 7 6 5 4 3 2 1 0 519 bit 7 6 5 4 3 2 1 0
516 bx7 bx6 bx5 bx4 bx3 bx2 bx1 bx0 520 bx7 bx6 bx5 bx4 bx3 bx2 bx1 bx0
517 521
518 bx8..bx0 = upper-right finger absolute x value 522 bx8..bx0 = upper-right finger absolute x value
519 523
520byte 5: 524byte 5::
521 525
522 bit 7 6 5 4 3 2 1 0 526 bit 7 6 5 4 3 2 1 0
523 by7 by8 by5 by4 by3 by2 by1 by0 527 by7 by8 by5 by4 by3 by2 by1 by0
524 528
525 by8..by0 = upper-right finger absolute y value 529 by8..by0 = upper-right finger absolute y value
526 530
527///////////////////////////////////////////////////////////////////////////// 531Hardware version 3
532~~~~~~~~~~~~~~~~~~
528 533
5296. Hardware version 3 534Registers
530 ================== 535---------
531 536
5326.1 Registers 537* reg_10::
533 ~~~~~~~~~
534* reg_10
535 538
536 bit 7 6 5 4 3 2 1 0 539 bit 7 6 5 4 3 2 1 0
537 0 0 0 0 R F T A 540 0 0 0 0 R F T A
@@ -541,8 +544,9 @@ byte 5:
541 F: 1 = disable ABS Position Filter 544 F: 1 = disable ABS Position Filter
542 R: 1 = enable real hardware resolution 545 R: 1 = enable real hardware resolution
543 546
5446.2 Native absolute mode 6 byte packet format 547Native absolute mode 6 byte packet format
545 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 548-----------------------------------------
549
5461 and 3 finger touch shares the same 6-byte packet format, except that 5501 and 3 finger touch shares the same 6-byte packet format, except that
5473 finger touch only reports the position of the center of all three fingers. 5513 finger touch only reports the position of the center of all three fingers.
548 552
@@ -552,19 +556,21 @@ Note on debounce:
552In case the box has unstable power supply or other electricity issues, or 556In case the box has unstable power supply or other electricity issues, or
553when number of finger changes, F/W would send "debounce packet" to inform 557when number of finger changes, F/W would send "debounce packet" to inform
554driver that the hardware is in debounce status. 558driver that the hardware is in debounce status.
555The debouce packet has the following signature: 559The debouce packet has the following signature::
560
556 byte 0: 0xc4 561 byte 0: 0xc4
557 byte 1: 0xff 562 byte 1: 0xff
558 byte 2: 0xff 563 byte 2: 0xff
559 byte 3: 0x02 564 byte 3: 0x02
560 byte 4: 0xff 565 byte 4: 0xff
561 byte 5: 0xff 566 byte 5: 0xff
567
562When we encounter this kind of packet, we just ignore it. 568When we encounter this kind of packet, we just ignore it.
563 569
5646.2.1 One/Three finger touch 570One/Three finger touch
565 ~~~~~~~~~~~~~~~~~~~~~~ 571^^^^^^^^^^^^^^^^^^^^^^
566 572
567byte 0: 573byte 0::
568 574
569 bit 7 6 5 4 3 2 1 0 575 bit 7 6 5 4 3 2 1 0
570 n1 n0 w3 w2 0 1 R L 576 n1 n0 w3 w2 0 1 R L
@@ -572,63 +578,63 @@ byte 0:
572 L, R = 1 when Left, Right mouse button pressed 578 L, R = 1 when Left, Right mouse button pressed
573 n1..n0 = number of fingers on touchpad 579 n1..n0 = number of fingers on touchpad
574 580
575byte 1: 581byte 1::
576 582
577 bit 7 6 5 4 3 2 1 0 583 bit 7 6 5 4 3 2 1 0
578 p7 p6 p5 p4 x11 x10 x9 x8 584 p7 p6 p5 p4 x11 x10 x9 x8
579 585
580byte 2: 586byte 2::
581 587
582 bit 7 6 5 4 3 2 1 0 588 bit 7 6 5 4 3 2 1 0
583 x7 x6 x5 x4 x3 x2 x1 x0 589 x7 x6 x5 x4 x3 x2 x1 x0
584 590
585 x11..x0 = absolute x value (horizontal) 591 x11..x0 = absolute x value (horizontal)
586 592
587byte 3: 593byte 3::
588 594
589 bit 7 6 5 4 3 2 1 0 595 bit 7 6 5 4 3 2 1 0
590 0 0 w1 w0 0 0 1 0 596 0 0 w1 w0 0 0 1 0
591 597
592 w3..w0 = width of the finger touch 598 w3..w0 = width of the finger touch
593 599
594byte 4: 600byte 4::
595 601
596 bit 7 6 5 4 3 2 1 0 602 bit 7 6 5 4 3 2 1 0
597 p3 p1 p2 p0 y11 y10 y9 y8 603 p3 p1 p2 p0 y11 y10 y9 y8
598 604
599 p7..p0 = pressure 605 p7..p0 = pressure
600 606
601byte 5: 607byte 5::
602 608
603 bit 7 6 5 4 3 2 1 0 609 bit 7 6 5 4 3 2 1 0
604 y7 y6 y5 y4 y3 y2 y1 y0 610 y7 y6 y5 y4 y3 y2 y1 y0
605 611
606 y11..y0 = absolute y value (vertical) 612 y11..y0 = absolute y value (vertical)
607 613
6086.2.2 Two finger touch 614Two finger touch
609 ~~~~~~~~~~~~~~~~ 615^^^^^^^^^^^^^^^^
610 616
611The packet format is exactly the same for two finger touch, except the hardware 617The packet format is exactly the same for two finger touch, except the hardware
612sends two 6 byte packets. The first packet contains data for the first finger, 618sends two 6 byte packets. The first packet contains data for the first finger,
613the second packet has data for the second finger. So for two finger touch a 619the second packet has data for the second finger. So for two finger touch a
614total of 12 bytes are sent. 620total of 12 bytes are sent.
615 621
616///////////////////////////////////////////////////////////////////////////// 622Hardware version 4
623~~~~~~~~~~~~~~~~~~
617 624
6187. Hardware version 4 625Registers
619 ================== 626---------
620 627
6217.1 Registers 628* reg_07::
622 ~~~~~~~~~
623* reg_07
624 629
625 bit 7 6 5 4 3 2 1 0 630 bit 7 6 5 4 3 2 1 0
626 0 0 0 0 0 0 0 A 631 0 0 0 0 0 0 0 A
627 632
628 A: 1 = enable absolute tracking 633 A: 1 = enable absolute tracking
629 634
6307.2 Native absolute mode 6 byte packet format 635Native absolute mode 6 byte packet format
631 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 636-----------------------------------------
637
632v4 hardware is a true multitouch touchpad, capable of tracking up to 5 fingers. 638v4 hardware is a true multitouch touchpad, capable of tracking up to 5 fingers.
633Unfortunately, due to PS/2's limited bandwidth, its packet format is rather 639Unfortunately, due to PS/2's limited bandwidth, its packet format is rather
634complex. 640complex.
@@ -647,45 +653,49 @@ position, until we receive a status packet.
647One exception is one finger touch. when a status packet tells us there is only 653One exception is one finger touch. when a status packet tells us there is only
648one finger, the hardware would just send head packets afterwards. 654one finger, the hardware would just send head packets afterwards.
649 655
6507.2.1 Status packet 656Status packet
651 ~~~~~~~~~~~~~ 657^^^^^^^^^^^^^
652 658
653byte 0: 659byte 0::
654 660
655 bit 7 6 5 4 3 2 1 0 661 bit 7 6 5 4 3 2 1 0
656 . . . . 0 1 R L 662 . . . . 0 1 R L
657 663
658 L, R = 1 when Left, Right mouse button pressed 664 L, R = 1 when Left, Right mouse button pressed
659 665
660byte 1: 666byte 1::
661 667
662 bit 7 6 5 4 3 2 1 0 668 bit 7 6 5 4 3 2 1 0
663 . . . ft4 ft3 ft2 ft1 ft0 669 . . . ft4 ft3 ft2 ft1 ft0
664 670
665 ft4 ft3 ft2 ft1 ft0 ftn = 1 when finger n is on touchpad 671 ft4 ft3 ft2 ft1 ft0 ftn = 1 when finger n is on touchpad
666 672
667byte 2: not used 673byte 2::
674
675 not used
668 676
669byte 3: 677byte 3::
670 678
671 bit 7 6 5 4 3 2 1 0 679 bit 7 6 5 4 3 2 1 0
672 . . . 1 0 0 0 0 680 . . . 1 0 0 0 0
673 681
674 constant bits 682 constant bits
675 683
676byte 4: 684byte 4::
677 685
678 bit 7 6 5 4 3 2 1 0 686 bit 7 6 5 4 3 2 1 0
679 p . . . . . . . 687 p . . . . . . .
680 688
681 p = 1 for palm 689 p = 1 for palm
682 690
683byte 5: not used 691byte 5::
684 692
6857.2.2 Head packet 693 not used
686 ~~~~~~~~~~~
687 694
688byte 0: 695Head packet
696^^^^^^^^^^^
697
698byte 0::
689 699
690 bit 7 6 5 4 3 2 1 0 700 bit 7 6 5 4 3 2 1 0
691 w3 w2 w1 w0 0 1 R L 701 w3 w2 w1 w0 0 1 R L
@@ -693,43 +703,43 @@ byte 0:
693 L, R = 1 when Left, Right mouse button pressed 703 L, R = 1 when Left, Right mouse button pressed
694 w3..w0 = finger width (spans how many trace lines) 704 w3..w0 = finger width (spans how many trace lines)
695 705
696byte 1: 706byte 1::
697 707
698 bit 7 6 5 4 3 2 1 0 708 bit 7 6 5 4 3 2 1 0
699 p7 p6 p5 p4 x11 x10 x9 x8 709 p7 p6 p5 p4 x11 x10 x9 x8
700 710
701byte 2: 711byte 2::
702 712
703 bit 7 6 5 4 3 2 1 0 713 bit 7 6 5 4 3 2 1 0
704 x7 x6 x5 x4 x3 x2 x1 x0 714 x7 x6 x5 x4 x3 x2 x1 x0
705 715
706 x11..x0 = absolute x value (horizontal) 716 x11..x0 = absolute x value (horizontal)
707 717
708byte 3: 718byte 3::
709 719
710 bit 7 6 5 4 3 2 1 0 720 bit 7 6 5 4 3 2 1 0
711 id2 id1 id0 1 0 0 0 1 721 id2 id1 id0 1 0 0 0 1
712 722
713 id2..id0 = finger id 723 id2..id0 = finger id
714 724
715byte 4: 725byte 4::
716 726
717 bit 7 6 5 4 3 2 1 0 727 bit 7 6 5 4 3 2 1 0
718 p3 p1 p2 p0 y11 y10 y9 y8 728 p3 p1 p2 p0 y11 y10 y9 y8
719 729
720 p7..p0 = pressure 730 p7..p0 = pressure
721 731
722byte 5: 732byte 5::
723 733
724 bit 7 6 5 4 3 2 1 0 734 bit 7 6 5 4 3 2 1 0
725 y7 y6 y5 y4 y3 y2 y1 y0 735 y7 y6 y5 y4 y3 y2 y1 y0
726 736
727 y11..y0 = absolute y value (vertical) 737 y11..y0 = absolute y value (vertical)
728 738
7297.2.3 Motion packet 739Motion packet
730 ~~~~~~~~~~~~~ 740^^^^^^^^^^^^^
731 741
732byte 0: 742byte 0::
733 743
734 bit 7 6 5 4 3 2 1 0 744 bit 7 6 5 4 3 2 1 0
735 id2 id1 id0 w 0 1 R L 745 id2 id1 id0 w 0 1 R L
@@ -739,35 +749,35 @@ byte 0:
739 w = 1 when delta overflows (> 127 or < -128), in this case 749 w = 1 when delta overflows (> 127 or < -128), in this case
740 firmware sends us (delta x / 5) and (delta y / 5) 750 firmware sends us (delta x / 5) and (delta y / 5)
741 751
742byte 1: 752byte 1::
743 753
744 bit 7 6 5 4 3 2 1 0 754 bit 7 6 5 4 3 2 1 0
745 x7 x6 x5 x4 x3 x2 x1 x0 755 x7 x6 x5 x4 x3 x2 x1 x0
746 756
747 x7..x0 = delta x (two's complement) 757 x7..x0 = delta x (two's complement)
748 758
749byte 2: 759byte 2::
750 760
751 bit 7 6 5 4 3 2 1 0 761 bit 7 6 5 4 3 2 1 0
752 y7 y6 y5 y4 y3 y2 y1 y0 762 y7 y6 y5 y4 y3 y2 y1 y0
753 763
754 y7..y0 = delta y (two's complement) 764 y7..y0 = delta y (two's complement)
755 765
756byte 3: 766byte 3::
757 767
758 bit 7 6 5 4 3 2 1 0 768 bit 7 6 5 4 3 2 1 0
759 id2 id1 id0 1 0 0 1 0 769 id2 id1 id0 1 0 0 1 0
760 770
761 id2..id0 = finger id 771 id2..id0 = finger id
762 772
763byte 4: 773byte 4::
764 774
765 bit 7 6 5 4 3 2 1 0 775 bit 7 6 5 4 3 2 1 0
766 x7 x6 x5 x4 x3 x2 x1 x0 776 x7 x6 x5 x4 x3 x2 x1 x0
767 777
768 x7..x0 = delta x (two's complement) 778 x7..x0 = delta x (two's complement)
769 779
770byte 5: 780byte 5::
771 781
772 bit 7 6 5 4 3 2 1 0 782 bit 7 6 5 4 3 2 1 0
773 y7 y6 y5 y4 y3 y2 y1 y0 783 y7 y6 y5 y4 y3 y2 y1 y0
@@ -778,33 +788,47 @@ byte 5:
778 byte 3 ~ 5 for another 788 byte 3 ~ 5 for another
779 789
780 790
7818. Trackpoint (for Hardware version 3 and 4) 791Trackpoint (for Hardware version 3 and 4)
782 ========================================= 792~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
7838.1 Registers 793
784 ~~~~~~~~~ 794Registers
795---------
796
785No special registers have been identified. 797No special registers have been identified.
786 798
7878.2 Native relative mode 6 byte packet format 799Native relative mode 6 byte packet format
788 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 800-----------------------------------------
7898.2.1 Status Packet 801
790 ~~~~~~~~~~~~~ 802Status Packet
803^^^^^^^^^^^^^
804
805byte 0::
791 806
792byte 0:
793 bit 7 6 5 4 3 2 1 0 807 bit 7 6 5 4 3 2 1 0
794 0 0 sx sy 0 M R L 808 0 0 sx sy 0 M R L
795byte 1: 809
810byte 1::
811
796 bit 7 6 5 4 3 2 1 0 812 bit 7 6 5 4 3 2 1 0
797 ~sx 0 0 0 0 0 0 0 813 ~sx 0 0 0 0 0 0 0
798byte 2: 814
815byte 2::
816
799 bit 7 6 5 4 3 2 1 0 817 bit 7 6 5 4 3 2 1 0
800 ~sy 0 0 0 0 0 0 0 818 ~sy 0 0 0 0 0 0 0
801byte 3: 819
820byte 3::
821
802 bit 7 6 5 4 3 2 1 0 822 bit 7 6 5 4 3 2 1 0
803 0 0 ~sy ~sx 0 1 1 0 823 0 0 ~sy ~sx 0 1 1 0
804byte 4: 824
825byte 4::
826
805 bit 7 6 5 4 3 2 1 0 827 bit 7 6 5 4 3 2 1 0
806 x7 x6 x5 x4 x3 x2 x1 x0 828 x7 x6 x5 x4 x3 x2 x1 x0
807byte 5: 829
830byte 5::
831
808 bit 7 6 5 4 3 2 1 0 832 bit 7 6 5 4 3 2 1 0
809 y7 y6 y5 y4 y3 y2 y1 y0 833 y7 y6 y5 y4 y3 y2 y1 y0
810 834