diff options
author | JJ Ding <jj_ding@emc.com.tw> | 2011-09-09 13:31:58 -0400 |
---|---|---|
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2011-09-09 13:35:02 -0400 |
commit | 1dc6edec127e1fdb89d246189c232fe635d2f921 (patch) | |
tree | ed12c72185f5124ae9ef8cfb2e6cc01dc4e12b45 /Documentation/input | |
parent | 28f49616113f3a1fbef789319bfd2122d0c3663f (diff) |
Input: elantech - add v4 hardware support
v4 hardware is a true multitouch capable touchpad (up to 5 fingers).
The packet format is quite complex, please see protocol document for
reference.
Signed-off-by: JJ Ding <jj_ding@emc.com.tw>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Diffstat (limited to 'Documentation/input')
-rw-r--r-- | Documentation/input/elantech.txt | 170 |
1 files changed, 170 insertions, 0 deletions
diff --git a/Documentation/input/elantech.txt b/Documentation/input/elantech.txt index cee08eecda43..5602eb71ad5d 100644 --- a/Documentation/input/elantech.txt +++ b/Documentation/input/elantech.txt | |||
@@ -32,6 +32,12 @@ Contents | |||
32 | 6.2 Native absolute mode 6 byte packet format | 32 | 6.2 Native absolute mode 6 byte packet format |
33 | 6.2.1 One/Three finger touch | 33 | 6.2.1 One/Three finger touch |
34 | 6.2.2 Two 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 | ||
35 | 41 | ||
36 | 42 | ||
37 | 43 | ||
@@ -573,3 +579,167 @@ The packet format is exactly the same for two finger touch, except the hardware | |||
573 | sends two 6 byte packets. The first packet contains data for the first finger, | 579 | sends two 6 byte packets. The first packet contains data for the first finger, |
574 | the second packet has data for the second finger. So for two finger touch a | 580 | the second packet has data for the second finger. So for two finger touch a |
575 | total of 12 bytes are sent. | 581 | total of 12 bytes are sent. |
582 | |||
583 | ///////////////////////////////////////////////////////////////////////////// | ||
584 | |||
585 | 7. Hardware version 4 | ||
586 | ================== | ||
587 | |||
588 | 7.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 | |||
597 | 7.2 Native absolute mode 6 byte packet format | ||
598 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
599 | v4 hardware is a true multitouch touchpad, capable of tracking up to 5 fingers. | ||
600 | Unfortunately, due to PS/2's limited bandwidth, its packet format is rather | ||
601 | complex. | ||
602 | |||
603 | Whenever the numbers or identities of the fingers changes, the hardware sends a | ||
604 | status packet to indicate how many and which fingers is on touchpad, followed by | ||
605 | head packets or motion packets. A head packet contains data of finger id, finger | ||
606 | position (absolute x, y values), width, and pressure. A motion packet contains | ||
607 | two fingers' position delta. | ||
608 | |||
609 | For example, when status packet tells there are 2 fingers on touchpad, then we | ||
610 | can expect two following head packets. If the finger status doesn't change, | ||
611 | the following packets would be motion packets, only sending delta of finger | ||
612 | position, until we receive a status packet. | ||
613 | |||
614 | One exception is one finger touch. when a status packet tells us there is only | ||
615 | one finger, the hardware would just send head packets afterwards. | ||
616 | |||
617 | 7.2.1 Status packet | ||
618 | ~~~~~~~~~~~~~ | ||
619 | |||
620 | byte 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 | |||
627 | byte 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 | |||
634 | byte 2: not used | ||
635 | |||
636 | byte 3: | ||
637 | |||
638 | bit 7 6 5 4 3 2 1 0 | ||
639 | . . . 1 0 0 0 0 | ||
640 | |||
641 | constant bits | ||
642 | |||
643 | byte 4: | ||
644 | |||
645 | bit 7 6 5 4 3 2 1 0 | ||
646 | p . . . . . . . | ||
647 | |||
648 | p = 1 for palm | ||
649 | |||
650 | byte 5: not used | ||
651 | |||
652 | 7.2.2 Head packet | ||
653 | ~~~~~~~~~~~ | ||
654 | |||
655 | byte 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 | |||
663 | byte 1: | ||
664 | |||
665 | bit 7 6 5 4 3 2 1 0 | ||
666 | p7 p6 p5 p4 x11 x10 x9 x8 | ||
667 | |||
668 | byte 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 | |||
675 | byte 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 | |||
682 | byte 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 | |||
689 | byte 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 | |||
696 | 7.2.3 Motion packet | ||
697 | ~~~~~~~~~~~~~ | ||
698 | |||
699 | byte 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 | |||
709 | byte 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 | |||
716 | byte 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 | |||
723 | byte 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 | |||
730 | byte 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 | |||
737 | byte 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 | ||