Skip to content

Commit

Permalink
Input: elantech - allow forcing Elantech protocol
Browse files Browse the repository at this point in the history
Apparently hardware vendors now ship elantech touchpads with different version
magic. This options allows for them to be tested easier with the current driver
in order to add their magic to the whitelist later.

Signed-off-by: Florian Ragwitz <rafl@debian.org>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
  • Loading branch information
Florian Ragwitz authored and Dmitry Torokhov committed May 4, 2010
1 parent 225c61a commit f81bc78
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions drivers/input/mouse/elantech.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@
printk(KERN_DEBUG format, ##arg); \
} 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
*/
Expand Down Expand Up @@ -595,8 +599,12 @@ int elantech_detect(struct psmouse *psmouse, bool set_properties)
param[0], param[1], param[2]);

if (param[0] == 0 || param[1] != 0) {
pr_debug("elantech.c: Probably not a real Elantech touchpad. Aborting.\n");
return -1;
if (!force_elantech) {
pr_debug("elantech.c: Probably not a real Elantech touchpad. Aborting.\n");
return -1;
}

pr_debug("elantech.c: Probably not a real Elantech touchpad. Enabling anyway due to force_elantech.\n");
}

if (set_properties) {
Expand Down

0 comments on commit f81bc78

Please sign in to comment.