summaryrefslogtreecommitdiffstats
path: root/drivers/input/mouse/alps.c
diff options
context:
space:
mode:
authorYunkang Tang <yunkang.tang@cn.alps.com>2014-07-26 07:29:24 +0200
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2014-07-26 23:03:12 +0200
commitf105e34a4e3ff073b0d96d5f91eb3c6e8dffaa4c (patch)
tree0177d8c1182eccc2e4efb3320ede4777f6ee1f40 /drivers/input/mouse/alps.c
parentInput: soc_button_array - add missing memory allocation check (diff)
downloadlinux-f105e34a4e3ff073b0d96d5f91eb3c6e8dffaa4c.tar.xz
linux-f105e34a4e3ff073b0d96d5f91eb3c6e8dffaa4c.zip
Input: alps - fix rushmore packet decoding
Signed-off-by: Yunkang Tang <yunkang.tang@cn.alps.com> Signed-off-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.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/input/mouse/alps.c b/drivers/input/mouse/alps.c
index fb15c64ffb95..e15daea56864 100644
--- a/drivers/input/mouse/alps.c
+++ b/drivers/input/mouse/alps.c
@@ -559,6 +559,9 @@ static void alps_decode_rushmore(struct alps_fields *f, unsigned char *p,
{
alps_decode_pinnacle(f, p, psmouse);
+ /* Rushmore's packet decode has a bit difference with Pinnacle's */
+ f->is_mp = !!(p[5] & 0x40);
+ f->fingers = max((p[5] & 0x3), ((p[5] >> 2) & 0x3)) + 1;
f->x_map |= (p[5] & 0x10) << 11;
f->y_map |= (p[5] & 0x20) << 6;
}