]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - glsdk/meta-ti-glsdk.git/blob - recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.10/0074-Input-ALPS-fix-touchpad-detection-when-buttons-are-p.patch
linux-ti335x-psp 3.2: update to v3.2.11
[glsdk/meta-ti-glsdk.git] / recipes-kernel / linux / linux-ti33x-psp-3.2 / 3.2.10 / 0074-Input-ALPS-fix-touchpad-detection-when-buttons-are-p.patch
1 From 5162124d608a6fe5d31d75b7aa8ee3accb839b73 Mon Sep 17 00:00:00 2001
2 From: Akio Idehara <zbe64533@gmail.com>
3 Date: Thu, 8 Mar 2012 13:48:12 -0600
4 Subject: [PATCH 74/95] Input: ALPS - fix touchpad detection when buttons are
5  pressed
7 commit 99c90ab31fad855b9da9dee3a5aa6c27f263e9d6 upstream.
9 ALPS touchpad detection fails if some buttons of ALPS are pressed.
10 The reason is that the "E6" query response byte is different from
11 what is expected.
13 This was tested on a Toshiba Portege R500.
15 Signed-off-by: Akio Idehara <zbe64533@gmail.com>
16 Tested-by: Seth Forshee <seth.forshee@canonical.com>
17 Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
18 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
19 ---
20  drivers/input/mouse/alps.c |    7 +++++--
21  1 file changed, 5 insertions(+), 2 deletions(-)
23 diff --git a/drivers/input/mouse/alps.c b/drivers/input/mouse/alps.c
24 index 003587c..9c40c11 100644
25 --- a/drivers/input/mouse/alps.c
26 +++ b/drivers/input/mouse/alps.c
27 @@ -421,7 +421,9 @@ static const struct alps_model_info *alps_get_model(struct psmouse *psmouse, int
28  
29         /*
30          * First try "E6 report".
31 -        * ALPS should return 0,0,10 or 0,0,100
32 +        * ALPS should return 0,0,10 or 0,0,100 if no buttons are pressed.
33 +        * The bits 0-2 of the first byte will be 1s if some buttons are
34 +        * pressed.
35          */
36         param[0] = 0;
37         if (ps2_command(ps2dev, param, PSMOUSE_CMD_SETRES) ||
38 @@ -437,7 +439,8 @@ static const struct alps_model_info *alps_get_model(struct psmouse *psmouse, int
39         psmouse_dbg(psmouse, "E6 report: %2.2x %2.2x %2.2x",
40                     param[0], param[1], param[2]);
41  
42 -       if (param[0] != 0 || param[1] != 0 || (param[2] != 10 && param[2] != 100))
43 +       if ((param[0] & 0xf8) != 0 || param[1] != 0 ||
44 +           (param[2] != 10 && param[2] != 100))
45                 return NULL;
46  
47         /*
48 -- 
49 1.7.9.4