aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation/input/elantech.txt
diff options
context:
space:
mode:
Diffstat (limited to 'Documentation/input/elantech.txt')
-rw-r--r--Documentation/input/elantech.txt295
1 files changed, 16 insertions, 279 deletions
diff --git a/Documentation/input/elantech.txt b/Documentation/input/elantech.txt
index 5602eb71ad5..db798af5ef9 100644
--- a/Documentation/input/elantech.txt
+++ b/Documentation/input/elantech.txt
@@ -16,28 +16,15 @@ Contents
16 16
17 1. Introduction 17 1. Introduction
18 2. Extra knobs 18 2. Extra knobs
19 3. Differentiating hardware versions 19 3. Hardware version 1
20 4. Hardware version 1 20 3.1 Registers
21 3.2 Native relative mode 4 byte packet format
22 3.3 Native absolute mode 4 byte packet format
23 4. Hardware version 2
21 4.1 Registers 24 4.1 Registers
22 4.2 Native relative mode 4 byte packet format 25 4.2 Native absolute mode 6 byte packet format
23 4.3 Native absolute mode 4 byte packet format 26 4.2.1 One finger touch
24 5. Hardware version 2 27 4.2.2 Two finger touch
25 5.1 Registers
26 5.2 Native absolute mode 6 byte packet format
27 5.2.1 Parity checking and packet re-synchronization
28 5.2.2 One/Three finger touch
29 5.2.3 Two finger touch
30 6. Hardware version 3
31 6.1 Registers
32 6.2 Native absolute mode 6 byte packet format
33 6.2.1 One/Three finger touch
34 6.2.2 Two finger touch
35 7. Hardware version 4
36 7.1 Registers
37 7.2 Native absolute mode 6 byte packet format
38 7.2.1 Status packet
39 7.2.2 Head packet
40 7.2.3 Motion packet
41 28
42 29
43 30
@@ -388,7 +375,7 @@ For all the other ones, there are just a few constant bits:
388 375
389In case an error is detected, all the packets are shifted by one (and packet[0] is discarded). 376In case an error is detected, all the packets are shifted by one (and packet[0] is discarded).
390 377
3915.2.2 One/Three finger touch 3785.2.1 One/Three finger touch
392 ~~~~~~~~~~~~~~~~ 379 ~~~~~~~~~~~~~~~~
393 380
394byte 0: 381byte 0:
@@ -397,19 +384,19 @@ byte 0:
397 n1 n0 w3 w2 . . R L 384 n1 n0 w3 w2 . . R L
398 385
399 L, R = 1 when Left, Right mouse button pressed 386 L, R = 1 when Left, Right mouse button pressed
400 n1..n0 = number of fingers on touchpad 387 n1..n0 = numbers of fingers on touchpad
401 388
402byte 1: 389byte 1:
403 390
404 bit 7 6 5 4 3 2 1 0 391 bit 7 6 5 4 3 2 1 0
405 p7 p6 p5 p4 x11 x10 x9 x8 392 p7 p6 p5 p4 . x10 x9 x8
406 393
407byte 2: 394byte 2:
408 395
409 bit 7 6 5 4 3 2 1 0 396 bit 7 6 5 4 3 2 1 0
410 x7 x6 x5 x4 x3 x2 x1 x0 397 x7 x6 x5 x4 x3 x2 x1 x0
411 398
412 x11..x0 = absolute x value (horizontal) 399 x10..x0 = absolute x value (horizontal)
413 400
414byte 3: 401byte 3:
415 402
@@ -433,7 +420,7 @@ byte 3:
433byte 4: 420byte 4:
434 421
435 bit 7 6 5 4 3 2 1 0 422 bit 7 6 5 4 3 2 1 0
436 p3 p1 p2 p0 y11 y10 y9 y8 423 p3 p1 p2 p0 . . y9 y8
437 424
438 p7..p0 = pressure (not EF113) 425 p7..p0 = pressure (not EF113)
439 426
@@ -442,10 +429,10 @@ byte 5:
442 bit 7 6 5 4 3 2 1 0 429 bit 7 6 5 4 3 2 1 0
443 y7 y6 y5 y4 y3 y2 y1 y0 430 y7 y6 y5 y4 y3 y2 y1 y0
444 431
445 y11..y0 = absolute y value (vertical) 432 y9..y0 = absolute y value (vertical)
446 433
447 434
4485.2.3 Two finger touch 4354.2.2 Two finger touch
449 ~~~~~~~~~~~~~~~~ 436 ~~~~~~~~~~~~~~~~
450 437
451Note that the two pairs of coordinates are not exactly the coordinates of the 438Note that the two pairs of coordinates are not exactly the coordinates of the
@@ -459,7 +446,7 @@ byte 0:
459 n1 n0 ay8 ax8 . . R L 446 n1 n0 ay8 ax8 . . R L
460 447
461 L, R = 1 when Left, Right mouse button pressed 448 L, R = 1 when Left, Right mouse button pressed
462 n1..n0 = number of fingers on touchpad 449 n1..n0 = numbers of fingers on touchpad
463 450
464byte 1: 451byte 1:
465 452
@@ -493,253 +480,3 @@ byte 5:
493 by7 by8 by5 by4 by3 by2 by1 by0 480 by7 by8 by5 by4 by3 by2 by1 by0
494 481
495 by8..by0 = upper-right finger absolute y value 482 by8..by0 = upper-right finger absolute y value
496
497/////////////////////////////////////////////////////////////////////////////
498
4996. Hardware version 3
500 ==================
501
5026.1 Registers
503 ~~~~~~~~~
504* reg_10
505
506 bit 7 6 5 4 3 2 1 0
507 0 0 0 0 0 0 0 A
508
509 A: 1 = enable absolute tracking
510
5116.2 Native absolute mode 6 byte packet format
512 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
5131 and 3 finger touch shares the same 6-byte packet format, except that
5143 finger touch only reports the position of the center of all three fingers.
515
516Firmware would send 12 bytes of data for 2 finger touch.
517
518Note on debounce:
519In case the box has unstable power supply or other electricity issues, or
520when number of finger changes, F/W would send "debounce packet" to inform
521driver that the hardware is in debounce status.
522The debouce packet has the following signature:
523 byte 0: 0xc4
524 byte 1: 0xff
525 byte 2: 0xff
526 byte 3: 0x02
527 byte 4: 0xff
528 byte 5: 0xff
529When we encounter this kind of packet, we just ignore it.
530
5316.2.1 One/Three finger touch
532 ~~~~~~~~~~~~~~~~~~~~~~
533
534byte 0:
535
536 bit 7 6 5 4 3 2 1 0
537 n1 n0 w3 w2 0 1 R L
538
539 L, R = 1 when Left, Right mouse button pressed
540 n1..n0 = number of fingers on touchpad
541
542byte 1:
543
544 bit 7 6 5 4 3 2 1 0
545 p7 p6 p5 p4 x11 x10 x9 x8
546
547byte 2:
548
549 bit 7 6 5 4 3 2 1 0
550 x7 x6 x5 x4 x3 x2 x1 x0
551
552 x11..x0 = absolute x value (horizontal)
553
554byte 3:
555
556 bit 7 6 5 4 3 2 1 0
557 0 0 w1 w0 0 0 1 0
558
559 w3..w0 = width of the finger touch
560
561byte 4:
562
563 bit 7 6 5 4 3 2 1 0
564 p3 p1 p2 p0 y11 y10 y9 y8
565
566 p7..p0 = pressure
567
568byte 5:
569
570 bit 7 6 5 4 3 2 1 0
571 y7 y6 y5 y4 y3 y2 y1 y0
572
573 y11..y0 = absolute y value (vertical)
574
5756.2.2 Two finger touch
576 ~~~~~~~~~~~~~~~~
577
578The packet format is exactly the same for two finger touch, except the hardware
579sends two 6 byte packets. The first packet contains data for the first finger,
580the second packet has data for the second finger. So for two finger touch a
581total of 12 bytes are sent.
582
583/////////////////////////////////////////////////////////////////////////////
584
5857. Hardware version 4
586 ==================
587
5887.1 Registers
589 ~~~~~~~~~
590* reg_07
591
592 bit 7 6 5 4 3 2 1 0
593 0 0 0 0 0 0 0 A
594
595 A: 1 = enable absolute tracking
596
5977.2 Native absolute mode 6 byte packet format
598 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
599v4 hardware is a true multitouch touchpad, capable of tracking up to 5 fingers.
600Unfortunately, due to PS/2's limited bandwidth, its packet format is rather
601complex.
602
603Whenever the numbers or identities of the fingers changes, the hardware sends a
604status packet to indicate how many and which fingers is on touchpad, followed by
605head packets or motion packets. A head packet contains data of finger id, finger
606position (absolute x, y values), width, and pressure. A motion packet contains
607two fingers' position delta.
608
609For example, when status packet tells there are 2 fingers on touchpad, then we
610can expect two following head packets. If the finger status doesn't change,
611the following packets would be motion packets, only sending delta of finger
612position, until we receive a status packet.
613
614One exception is one finger touch. when a status packet tells us there is only
615one finger, the hardware would just send head packets afterwards.
616
6177.2.1 Status packet
618 ~~~~~~~~~~~~~
619
620byte 0:
621
622 bit 7 6 5 4 3 2 1 0
623 . . . . 0 1 R L
624
625 L, R = 1 when Left, Right mouse button pressed
626
627byte 1:
628
629 bit 7 6 5 4 3 2 1 0
630 . . . ft4 ft3 ft2 ft1 ft0
631
632 ft4 ft3 ft2 ft1 ft0 ftn = 1 when finger n is on touchpad
633
634byte 2: not used
635
636byte 3:
637
638 bit 7 6 5 4 3 2 1 0
639 . . . 1 0 0 0 0
640
641 constant bits
642
643byte 4:
644
645 bit 7 6 5 4 3 2 1 0
646 p . . . . . . .
647
648 p = 1 for palm
649
650byte 5: not used
651
6527.2.2 Head packet
653 ~~~~~~~~~~~
654
655byte 0:
656
657 bit 7 6 5 4 3 2 1 0
658 w3 w2 w1 w0 0 1 R L
659
660 L, R = 1 when Left, Right mouse button pressed
661 w3..w0 = finger width (spans how many trace lines)
662
663byte 1:
664
665 bit 7 6 5 4 3 2 1 0
666 p7 p6 p5 p4 x11 x10 x9 x8
667
668byte 2:
669
670 bit 7 6 5 4 3 2 1 0
671 x7 x6 x5 x4 x3 x2 x1 x0
672
673 x11..x0 = absolute x value (horizontal)
674
675byte 3:
676
677 bit 7 6 5 4 3 2 1 0
678 id2 id1 id0 1 0 0 0 1
679
680 id2..id0 = finger id
681
682byte 4:
683
684 bit 7 6 5 4 3 2 1 0
685 p3 p1 p2 p0 y11 y10 y9 y8
686
687 p7..p0 = pressure
688
689byte 5:
690
691 bit 7 6 5 4 3 2 1 0
692 y7 y6 y5 y4 y3 y2 y1 y0
693
694 y11..y0 = absolute y value (vertical)
695
6967.2.3 Motion packet
697 ~~~~~~~~~~~~~
698
699byte 0:
700
701 bit 7 6 5 4 3 2 1 0
702 id2 id1 id0 w 0 1 R L
703
704 L, R = 1 when Left, Right mouse button pressed
705 id2..id0 = finger id
706 w = 1 when delta overflows (> 127 or < -128), in this case
707 firmware sends us (delta x / 5) and (delta y / 5)
708
709byte 1:
710
711 bit 7 6 5 4 3 2 1 0
712 x7 x6 x5 x4 x3 x2 x1 x0
713
714 x7..x0 = delta x (two's complement)
715
716byte 2:
717
718 bit 7 6 5 4 3 2 1 0
719 y7 y6 y5 y4 y3 y2 y1 y0
720
721 y7..y0 = delta y (two's complement)
722
723byte 3:
724
725 bit 7 6 5 4 3 2 1 0
726 id2 id1 id0 1 0 0 1 0
727
728 id2..id0 = finger id
729
730byte 4:
731
732 bit 7 6 5 4 3 2 1 0
733 x7 x6 x5 x4 x3 x2 x1 x0
734
735 x7..x0 = delta x (two's complement)
736
737byte 5:
738
739 bit 7 6 5 4 3 2 1 0
740 y7 y6 y5 y4 y3 y2 y1 y0
741
742 y7..y0 = delta y (two's complement)
743
744 byte 0 ~ 2 for one finger
745 byte 3 ~ 5 for another