From: Akio Idehara <zbe64533@gmail.com>
To: dmitry.torokhov@gmail.com, dtor@mail.ru
Cc: seth.forshee@canonical.com, rubini@cvml.unipv.it,
linux-input@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-doc@vger.kernel.org, rdunlap@xenotime.net,
gregkh@linuxfoundation.org, torvalds@linux-foundation.org
Subject: Re: [PATCH v2] Input: ALPS - Fix ALPS touchpad detection
Date: Thu, 23 Feb 2012 23:41:11 +0900 [thread overview]
Message-ID: <4F465007.30304@gmail.com> (raw)
In-Reply-To: <20120216143210.GA30486@ubuntu-macmini>
This is definitely a bug which isn't fixed for nine years.
Why this patch isn't applied to the input sub-system (or mainline)?
Seth Forshee wrote:
> On Thu, Feb 16, 2012 at 10:11:55PM +0900, Akio Idehara wrote:
>> 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.
>>
>> Cc: stable<stable@vger.kernel.org>
>> Signed-off-by: Akio Idehara<zbe64533@gmail.com>
>
> This version is working fine for me. Thanks!
>
> Tested-by: Seth Forshee<seth.forshee@canonical.com>
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
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.
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Akio Idehara <zbe64533@gmail.com>
Tested-by: Seth Forshee<seth.forshee@canonical.com>
---
Documentation/input/alps.txt | 3 ++-
drivers/input/mouse/alps.c | 7 +++++--
2 files changed, 7 insertions(+), 3 deletions(-)
diff --git a/Documentation/input/alps.txt b/Documentation/input/alps.txt
index f274c28..2f95308 100644
--- a/Documentation/input/alps.txt
+++ b/Documentation/input/alps.txt
@@ -13,7 +13,8 @@ Detection
All ALPS touchpads should respond to the "E6 report" command sequence:
E8-E6-E6-E6-E9. An ALPS touchpad should respond with either 00-00-0A or
-00-00-64.
+00-00-64 if no buttons are pressed. The bits 0-2 of the first byte will be 1s
+if some buttons are pressed.
If the E6 report is successful, the touchpad model is identified using the "E7
report" sequence: E8-E7-E7-E7-E9. The response is the model signature and is
diff --git a/drivers/input/mouse/alps.c b/drivers/input/mouse/alps.c
index bd87380..4c6a72d 100644
--- a/drivers/input/mouse/alps.c
+++ b/drivers/input/mouse/alps.c
@@ -952,7 +952,9 @@ static const struct alps_model_info *alps_get_model(struct psmouse *psmouse, int
/*
* First try "E6 report".
- * ALPS should return 0,0,10 or 0,0,100
+ * ALPS should return 0,0,10 or 0,0,100 if no buttons are pressed.
+ * The bits 0-2 of the first byte will be 1s if some buttons are
+ * pressed.
*/
param[0] = 0;
if (ps2_command(ps2dev, param, PSMOUSE_CMD_SETRES) ||
@@ -968,7 +970,8 @@ static const struct alps_model_info *alps_get_model(struct psmouse *psmouse, int
psmouse_dbg(psmouse, "E6 report: %2.2x %2.2x %2.2x",
param[0], param[1], param[2]);
- if (param[0] != 0 || param[1] != 0 || (param[2] != 10 && param[2] != 100))
+ if ((param[0] & 0xf8) != 0 || param[1] != 0 ||
+ (param[2] != 10 && param[2] != 100))
return NULL;
/*
-- 1.7.9
next prev parent reply other threads:[~2012-02-23 14:41 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-02-16 13:11 [PATCH v2] Input: ALPS - Fix ALPS touchpad detection Akio Idehara
2012-02-16 14:32 ` Seth Forshee
2012-02-23 14:41 ` Akio Idehara [this message]
2012-02-24 8:17 ` Dmitry Torokhov
2012-02-24 10:19 ` Akio Idehara
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4F465007.30304@gmail.com \
--to=zbe64533@gmail.com \
--cc=dmitry.torokhov@gmail.com \
--cc=dtor@mail.ru \
--cc=gregkh@linuxfoundation.org \
--cc=linux-doc@vger.kernel.org \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=rdunlap@xenotime.net \
--cc=rubini@cvml.unipv.it \
--cc=seth.forshee@canonical.com \
--cc=torvalds@linux-foundation.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).