From: Andy Whitcroft <apw@canonical.com>
To: arjan@opmeer.net, patrakov@gmail.com, dmitry.torokhov@gmail.com
Cc: linux-kernel@vger.kernel.org
Subject: elantech touchpad driver miss-recognising logitech mice
Date: Mon, 26 Jan 2009 15:08:21 +0000 [thread overview]
Message-ID: <20090126150821.GC31179@shadowen.org> (raw)
We have been receiving reports of the elantech driver miss-recognising
logitech mice as per the patchwork thread below:
http://patchwork.kernel.org/patch/319/
That thread indicates that the patch as presented is not sufficient
so I am wondering if this has progressed and if there is a later patch I
could test with. I cannot see anything later in mainline as yet?
Failing that I did build a modified patch (below) based on that from the
thread plus the suggested improvements. This has been tested by people
with the Logitech mice successfully, and also by people with elantech
touchpads who report no regressions.
If there is no later patches then perhaps you could test this one, and
then I can push it upstream.
Comments?
-apw
>From b39b647dfd5106c340d588920704b6d696b182d9 Mon Sep 17 00:00:00 2001
From: Andy Whitcroft <apw@canonical.com>
Date: Fri, 23 Jan 2009 17:42:05 +0000
Subject: [PATCH 1/1] elantech touchpad -- weed out incorrectly identified Logitech Mice
Some Logitech USB-PS/2 Optical Mouse are triggering on the special knock
sequence when attached on PS/2. Use the version number to weed those out.
Note that as we have no private data we end up doing the version check
twice.
Based on an original patch by Arjan Opmeer <arjan@opmeer.net> and based
on suggestions from him on how to improve it.
Signed-off-by: Andy Whitcroft <apw@canonical.com>
---
drivers/input/mouse/elantech.c | 16 ++++++++++++++++
1 files changed, 16 insertions(+), 0 deletions(-)
diff --git a/drivers/input/mouse/elantech.c b/drivers/input/mouse/elantech.c
index b9a25d5..32febf5 100644
--- a/drivers/input/mouse/elantech.c
+++ b/drivers/input/mouse/elantech.c
@@ -556,6 +556,22 @@ int elantech_detect(struct psmouse *psmouse, int set_properties)
return -1;
}
+ /*
+ * Some Logitech USB-PS/2 Optical Mouse devices are responding to
+ * our magic knock. So ask for our device version and validate
+ * using that.
+ */
+ if (synaptics_send_cmd(psmouse, ETP_FW_VERSION_QUERY, param)) {
+ pr_err("elantech.c: failed to query firmware version.\n");
+ return -1;
+ }
+ pr_info("elantech.c: Elantech version query result 0x%02x, 0x%02x, 0x%02x.\n",
+ param[0], param[1], param[2]);
+ if (param[0] == 0 || param[1] != 0) {
+ pr_info("elantech.c: Probably not a real Elantech touchpad. Aborting.\n");
+ return -1;
+ }
+
if (set_properties) {
psmouse->vendor = "Elantech";
psmouse->name = "Touchpad";
--
1.6.1.258.g7ff14.dirty
next reply other threads:[~2009-01-26 15:08 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-01-26 15:08 Andy Whitcroft [this message]
2009-01-26 16:23 ` elantech touchpad driver miss-recognising logitech mice Arjan Opmeer
2009-01-30 23:23 ` Andrew Morton
2009-02-05 5:05 ` Arjan Opmeer
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=20090126150821.GC31179@shadowen.org \
--to=apw@canonical.com \
--cc=arjan@opmeer.net \
--cc=dmitry.torokhov@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=patrakov@gmail.com \
/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