From: Jonathan Nieder <jrnieder@gmail.com>
To: Nicola Alessi <nialessi@gmx.com>
Cc: JJ Ding <jj_ding@emc.com.tw>, linux-input@vger.kernel.org
Subject: Re: Elantech touchpad detected as Logitech PS2 Wheel Mouse
Date: Mon, 21 May 2012 03:28:09 -0500 [thread overview]
Message-ID: <20120521082809.GA5304@burratino> (raw)
In-Reply-To: <877gw655mi.fsf@emc.com.tw>
JJ Ding wrote:
> We used to have a "force_elantech" module param to force the TP to be
> detected as Elan, but I removed it when I was updating elantech.c to
> support newer models. Maybe you can convince Dmitry to add it back, but
> still, this kind of Elan touchpads is not supported as multi-touch
> pointing device, so I wouldn't recommand it.
Neat.
> I hope this helps.
Definitely; thanks for explaining. Nicola, I'm still curious about
the following:
>> E.g., is there another OS with a driver that detects it as Elantech?
If another OS offers more functionality, then we would know the
hardware is capable of it.
The patch JJ described follows, in case you want to experiment.
-- >8 --
Subject: Input: elantech - allow forcing Elantech protocol when knock fails
This does not quite revert 4af61e90270e35bafa9e99a3c48fb3f363da592d
("Input: elantech - remove module parameter force_elantech") --- the
old force_elantech parameter was about ignoring an unrecognized
response to ETP_FW_VERSION_QUERY, while this one is about ignoring
unrecognized responses to the magic knock.
This patch is just for experimentation and is not meant for inclusion.
---
drivers/input/mouse/elantech.c | 16 ++++++++++++----
1 file changed, 12 insertions(+), 4 deletions(-)
diff --git a/drivers/input/mouse/elantech.c b/drivers/input/mouse/elantech.c
index d2c0db159b18..55ac1aa5e943 100644
--- a/drivers/input/mouse/elantech.c
+++ b/drivers/input/mouse/elantech.c
@@ -27,6 +27,10 @@
fmt, ##__VA_ARGS__); \
} while (0)
+static bool force_elantech;
+module_param_named(force_elantech, force_elantech, bool, 0644);
+MODULE_PARM_DESC(force_elantech, "Force the Elantech PS/2 protocol extension to be used, 1 = enabled, 0 = disabled (default).");
+
/*
* Send a Synaptics style sliced query command
*/
@@ -1195,10 +1199,14 @@ int elantech_detect(struct psmouse *psmouse, bool set_properties)
*/
if (param[0] != 0x3c || param[1] != 0x03 ||
(param[2] != 0xc8 && param[2] != 0x00)) {
- psmouse_dbg(psmouse,
- "unexpected magic knock result 0x%02x, 0x%02x, 0x%02x.\n",
- param[0], param[1], param[2]);
- return -1;
+ if (!force_elantech) {
+ psmouse_dbg(psmouse,
+ "unexpected magic knock result 0x%02x, 0x%02x, 0x%02x.\n",
+ param[0], param[1], param[2]);
+ return -1;
+ }
+ psmouse_warning(psmouse, "Unexpected magic knock result.\n");
+ psmouse_info(psmouse, "Enabling anyway due to force_elantech.\n");
}
/*
--
1.7.10.2
next prev parent reply other threads:[~2012-05-21 8:28 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-05-20 18:36 Elantech touchpad detected as Logitech PS2 Wheel Mouse Nicola Alessi
2012-05-20 19:20 ` Jonathan Nieder
2012-05-20 20:18 ` Nicola Alessi
2012-05-21 5:23 ` Jonathan Nieder
2012-05-21 7:56 ` JJ Ding
2012-05-21 8:28 ` Jonathan Nieder [this message]
2012-05-21 13:45 ` Nicola Alessi
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=20120521082809.GA5304@burratino \
--to=jrnieder@gmail.com \
--cc=jj_ding@emc.com.tw \
--cc=linux-input@vger.kernel.org \
--cc=nialessi@gmx.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;
as well as URLs for NNTP newsgroup(s).