aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/input
diff options
context:
space:
mode:
authorAkio Idehara <zbe64533@gmail.com>2012-03-08 14:49:15 -0500
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-03-12 13:33:00 -0400
commit85746fedf610d9d432bad65c760ef0e05b0b2140 (patch)
tree136526ace37d8a42431adfaca4e22e11adaff83a /drivers/input
parent35df833a65492454cffecedbf7a6abc5ae27dcfc (diff)
Input: ALPS - fix touchpad detection when buttons are pressed
commit 99c90ab31fad855b9da9dee3a5aa6c27f263e9d6 upstream. ALPS touchpad detection fails if some buttons of ALPS are pressed. The reason is that the "E6" query response byte is different from what is expected. This was tested on a Toshiba Portege R500. Signed-off-by: Akio Idehara <zbe64533@gmail.com> Tested-by: Seth Forshee <seth.forshee@canonical.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/input')
-rw-r--r--drivers/input/mouse/alps.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/input/mouse/alps.c b/drivers/input/mouse/alps.c
index 99d58764ef0..0b9944346ec 100644
--- a/drivers/input/mouse/alps.c
+++ b/drivers/input/mouse/alps.c
@@ -426,7 +426,9 @@ static const struct alps_model_info *alps_get_model(struct psmouse *psmouse, int
426 426
427 /* 427 /*
428 * First try "E6 report". 428 * First try "E6 report".
429 * ALPS should return 0,0,10 or 0,0,100 429 * ALPS should return 0,0,10 or 0,0,100 if no buttons are pressed.
430 * The bits 0-2 of the first byte will be 1s if some buttons are
431 * pressed.
430 */ 432 */
431 param[0] = 0; 433 param[0] = 0;
432 if (ps2_command(ps2dev, param, PSMOUSE_CMD_SETRES) || 434 if (ps2_command(ps2dev, param, PSMOUSE_CMD_SETRES) ||
@@ -441,7 +443,8 @@ static const struct alps_model_info *alps_get_model(struct psmouse *psmouse, int
441 443
442 dbg("E6 report: %2.2x %2.2x %2.2x", param[0], param[1], param[2]); 444 dbg("E6 report: %2.2x %2.2x %2.2x", param[0], param[1], param[2]);
443 445
444 if (param[0] != 0 || param[1] != 0 || (param[2] != 10 && param[2] != 100)) 446 if ((param[0] & 0xf8) != 0 || param[1] != 0 ||
447 (param[2] != 10 && param[2] != 100))
445 return NULL; 448 return NULL;
446 449
447 /* 450 /*