diff options
Diffstat (limited to 'drivers/input/mouse/alps.c')
-rw-r--r-- | drivers/input/mouse/alps.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/drivers/input/mouse/alps.c b/drivers/input/mouse/alps.c index e6708f6efb4d..a353b7de6d22 100644 --- a/drivers/input/mouse/alps.c +++ b/drivers/input/mouse/alps.c | |||
@@ -941,6 +941,11 @@ static void alps_get_finger_coordinate_v7(struct input_mt_pos *mt, | |||
941 | case V7_PACKET_ID_TWO: | 941 | case V7_PACKET_ID_TWO: |
942 | mt[1].x &= ~0x000F; | 942 | mt[1].x &= ~0x000F; |
943 | mt[1].y |= 0x000F; | 943 | mt[1].y |= 0x000F; |
944 | /* Detect false-postive touches where x & y report max value */ | ||
945 | if (mt[1].y == 0x7ff && mt[1].x == 0xff0) { | ||
946 | mt[1].x = 0; | ||
947 | /* y gets set to 0 at the end of this function */ | ||
948 | } | ||
944 | break; | 949 | break; |
945 | 950 | ||
946 | case V7_PACKET_ID_MULTI: | 951 | case V7_PACKET_ID_MULTI: |
@@ -1058,9 +1063,8 @@ static void alps_process_trackstick_packet_v7(struct psmouse *psmouse) | |||
1058 | right = (packet[1] & 0x02) >> 1; | 1063 | right = (packet[1] & 0x02) >> 1; |
1059 | middle = (packet[1] & 0x04) >> 2; | 1064 | middle = (packet[1] & 0x04) >> 2; |
1060 | 1065 | ||
1061 | /* Divide 2 since trackpoint's speed is too fast */ | 1066 | input_report_rel(dev2, REL_X, (char)x); |
1062 | input_report_rel(dev2, REL_X, (char)x / 2); | 1067 | input_report_rel(dev2, REL_Y, -((char)y)); |
1063 | input_report_rel(dev2, REL_Y, -((char)y / 2)); | ||
1064 | 1068 | ||
1065 | input_report_key(dev2, BTN_LEFT, left); | 1069 | input_report_key(dev2, BTN_LEFT, left); |
1066 | input_report_key(dev2, BTN_RIGHT, right); | 1070 | input_report_key(dev2, BTN_RIGHT, right); |