diff options
| -rw-r--r-- | drivers/input/mouse/alps.c | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/drivers/input/mouse/alps.c b/drivers/input/mouse/alps.c index b48c6fb317ed..0faea6df228b 100644 --- a/drivers/input/mouse/alps.c +++ b/drivers/input/mouse/alps.c | |||
| @@ -881,6 +881,34 @@ static void alps_get_finger_coordinate_v7(struct input_mt_pos *mt, | |||
| 881 | unsigned char *pkt, | 881 | unsigned char *pkt, |
| 882 | unsigned char pkt_id) | 882 | unsigned char pkt_id) |
| 883 | { | 883 | { |
| 884 | /* | ||
| 885 | * packet-fmt b7 b6 b5 b4 b3 b2 b1 b0 | ||
| 886 | * Byte0 TWO & MULTI L 1 R M 1 Y0-2 Y0-1 Y0-0 | ||
| 887 | * Byte0 NEW L 1 X1-5 1 1 Y0-2 Y0-1 Y0-0 | ||
| 888 | * Byte1 Y0-10 Y0-9 Y0-8 Y0-7 Y0-6 Y0-5 Y0-4 Y0-3 | ||
| 889 | * Byte2 X0-11 1 X0-10 X0-9 X0-8 X0-7 X0-6 X0-5 | ||
| 890 | * Byte3 X1-11 1 X0-4 X0-3 1 X0-2 X0-1 X0-0 | ||
| 891 | * Byte4 TWO X1-10 TWO X1-9 X1-8 X1-7 X1-6 X1-5 X1-4 | ||
| 892 | * Byte4 MULTI X1-10 TWO X1-9 X1-8 X1-7 X1-6 Y1-5 1 | ||
| 893 | * Byte4 NEW X1-10 TWO X1-9 X1-8 X1-7 X1-6 0 0 | ||
| 894 | * Byte5 TWO & NEW Y1-10 0 Y1-9 Y1-8 Y1-7 Y1-6 Y1-5 Y1-4 | ||
| 895 | * Byte5 MULTI Y1-10 0 Y1-9 Y1-8 Y1-7 Y1-6 F-1 F-0 | ||
| 896 | * L: Left button | ||
| 897 | * R / M: Non-clickpads: Right / Middle button | ||
| 898 | * Clickpads: When > 2 fingers are down, and some fingers | ||
| 899 | * are in the button area, then the 2 coordinates reported | ||
| 900 | * are for fingers outside the button area and these report | ||
| 901 | * extra fingers being present in the right / left button | ||
| 902 | * area. Note these fingers are not added to the F field! | ||
| 903 | * so if a TWO packet is received and R = 1 then there are | ||
| 904 | * 3 fingers down, etc. | ||
| 905 | * TWO: 1: Two touches present, byte 0/4/5 are in TWO fmt | ||
| 906 | * 0: If byte 4 bit 0 is 1, then byte 0/4/5 are in MULTI fmt | ||
| 907 | * otherwise byte 0 bit 4 must be set and byte 0/4/5 are | ||
| 908 | * in NEW fmt | ||
| 909 | * F: Number of fingers - 3, 0 means 3 fingers, 1 means 4 ... | ||
| 910 | */ | ||
| 911 | |||
| 884 | mt[0].x = ((pkt[2] & 0x80) << 4); | 912 | mt[0].x = ((pkt[2] & 0x80) << 4); |
| 885 | mt[0].x |= ((pkt[2] & 0x3F) << 5); | 913 | mt[0].x |= ((pkt[2] & 0x3F) << 5); |
| 886 | mt[0].x |= ((pkt[3] & 0x30) >> 1); | 914 | mt[0].x |= ((pkt[3] & 0x30) >> 1); |
