summaryrefslogtreecommitdiffstats
path: root/drivers/input
diff options
context:
space:
mode:
authorKT Liao <kt.liao@emc.com.tw>2016-12-12 11:03:42 -0800
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2017-05-11 18:00:32 -0700
commitd899520b0431e70279bfb5066ecb6dc91d0b7072 (patch)
tree2aa62a5a203049255683f525bc58f865673976e5 /drivers/input
parenta2eaf299d134cfe780c68c771f88d81516c1e70d (diff)
downloadlinux-d899520b0431e70279bfb5066ecb6dc91d0b7072.tar.bz2
Input: elantech - force relative mode on a certain module
One of Elan modules with sample version is 0x74 and hw_version is 0x03 has a bug in absolute mode implementation, so let it run in default PS/2 relative mode. Signed-off-by: KT Liao <kt.liao@emc.com.tw> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Diffstat (limited to 'drivers/input')
-rw-r--r--drivers/input/mouse/elantech.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/input/mouse/elantech.c b/drivers/input/mouse/elantech.c
index efc8ec342351..3dbab0727376 100644
--- a/drivers/input/mouse/elantech.c
+++ b/drivers/input/mouse/elantech.c
@@ -1687,6 +1687,17 @@ int elantech_init(struct psmouse *psmouse)
etd->samples[0], etd->samples[1], etd->samples[2]);
}
+ if (etd->samples[1] == 0x74 && etd->hw_version == 0x03) {
+ /*
+ * This module has a bug which makes absolute mode
+ * unusable, so let's abort so we'll be using standard
+ * PS/2 protocol.
+ */
+ psmouse_info(psmouse,
+ "absolute mode broken, forcing standard PS/2 protocol\n");
+ goto init_fail;
+ }
+
if (elantech_set_absolute_mode(psmouse)) {
psmouse_err(psmouse,
"failed to put touchpad into absolute mode.\n");