aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/input/mouse/alps.c
diff options
context:
space:
mode:
authorPali Rohár <pali.rohar@gmail.com>2015-02-15 18:58:08 -0500
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2015-02-15 19:04:23 -0500
commitef47fa5280819deaa8da7e0db1d875b225de5838 (patch)
tree6f53264a85eb9cc3a3dd696093041dd2e97238af /drivers/input/mouse/alps.c
parent626b9da0b5a55407ebddcfa9b983180e729736ce (diff)
Input: ALPS - move v7 packet info to Documentation and v6 packet info
This patch move all packet info from driver source code to documentation and adds info about v6 packet format (from driver source code). Signed-off-by: Pali Rohár <pali.rohar@gmail.com> Acked-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Diffstat (limited to 'drivers/input/mouse/alps.c')
-rw-r--r--drivers/input/mouse/alps.c39
1 files changed, 0 insertions, 39 deletions
diff --git a/drivers/input/mouse/alps.c b/drivers/input/mouse/alps.c
index b4144ad0987b..d28726a0ef85 100644
--- a/drivers/input/mouse/alps.c
+++ b/drivers/input/mouse/alps.c
@@ -909,34 +909,6 @@ static void alps_get_finger_coordinate_v7(struct input_mt_pos *mt,
909 unsigned char *pkt, 909 unsigned char *pkt,
910 unsigned char pkt_id) 910 unsigned char pkt_id)
911{ 911{
912 /*
913 * packet-fmt b7 b6 b5 b4 b3 b2 b1 b0
914 * Byte0 TWO & MULTI L 1 R M 1 Y0-2 Y0-1 Y0-0
915 * Byte0 NEW L 1 X1-5 1 1 Y0-2 Y0-1 Y0-0
916 * Byte1 Y0-10 Y0-9 Y0-8 Y0-7 Y0-6 Y0-5 Y0-4 Y0-3
917 * Byte2 X0-11 1 X0-10 X0-9 X0-8 X0-7 X0-6 X0-5
918 * Byte3 X1-11 1 X0-4 X0-3 1 X0-2 X0-1 X0-0
919 * Byte4 TWO X1-10 TWO X1-9 X1-8 X1-7 X1-6 X1-5 X1-4
920 * Byte4 MULTI X1-10 TWO X1-9 X1-8 X1-7 X1-6 Y1-5 1
921 * Byte4 NEW X1-10 TWO X1-9 X1-8 X1-7 X1-6 0 0
922 * Byte5 TWO & NEW Y1-10 0 Y1-9 Y1-8 Y1-7 Y1-6 Y1-5 Y1-4
923 * Byte5 MULTI Y1-10 0 Y1-9 Y1-8 Y1-7 Y1-6 F-1 F-0
924 * L: Left button
925 * R / M: Non-clickpads: Right / Middle button
926 * Clickpads: When > 2 fingers are down, and some fingers
927 * are in the button area, then the 2 coordinates reported
928 * are for fingers outside the button area and these report
929 * extra fingers being present in the right / left button
930 * area. Note these fingers are not added to the F field!
931 * so if a TWO packet is received and R = 1 then there are
932 * 3 fingers down, etc.
933 * TWO: 1: Two touches present, byte 0/4/5 are in TWO fmt
934 * 0: If byte 4 bit 0 is 1, then byte 0/4/5 are in MULTI fmt
935 * otherwise byte 0 bit 4 must be set and byte 0/4/5 are
936 * in NEW fmt
937 * F: Number of fingers - 3, 0 means 3 fingers, 1 means 4 ...
938 */
939
940 mt[0].x = ((pkt[2] & 0x80) << 4); 912 mt[0].x = ((pkt[2] & 0x80) << 4);
941 mt[0].x |= ((pkt[2] & 0x3F) << 5); 913 mt[0].x |= ((pkt[2] & 0x3F) << 5);
942 mt[0].x |= ((pkt[3] & 0x30) >> 1); 914 mt[0].x |= ((pkt[3] & 0x30) >> 1);
@@ -1061,17 +1033,6 @@ static void alps_process_trackstick_packet_v7(struct psmouse *psmouse)
1061 return; 1033 return;
1062 } 1034 }
1063 1035
1064 /*
1065 * b7 b6 b5 b4 b3 b2 b1 b0
1066 * Byte0 0 1 0 0 1 0 0 0
1067 * Byte1 1 1 * * 1 M R L
1068 * Byte2 X7 1 X5 X4 X3 X2 X1 X0
1069 * Byte3 Z6 1 Y6 X6 1 Y2 Y1 Y0
1070 * Byte4 Y7 0 Y5 Y4 Y3 1 1 0
1071 * Byte5 T&P 0 Z5 Z4 Z3 Z2 Z1 Z0
1072 * M / R / L: Middle / Right / Left button
1073 */
1074
1075 x = ((packet[2] & 0xbf)) | ((packet[3] & 0x10) << 2); 1036 x = ((packet[2] & 0xbf)) | ((packet[3] & 0x10) << 2);
1076 y = (packet[3] & 0x07) | (packet[4] & 0xb8) | 1037 y = (packet[3] & 0x07) | (packet[4] & 0xb8) |
1077 ((packet[3] & 0x20) << 1); 1038 ((packet[3] & 0x20) << 1);