summaryrefslogtreecommitdiff
path: root/drivers/input/mouse/elantech.h
diff options
context:
space:
mode:
authorjingle.wu <jingle.wu@emc.com.tw>2020-12-11 10:49:16 +0300
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2020-12-11 11:15:05 +0300
commite4c9062717feda88900b566463228d1c4910af6d (patch)
tree8456dbd01cbf68f0bf0fd97b9b79539955f3aeb3 /drivers/input/mouse/elantech.h
parent056115daede8d01f71732bc7d778fb85acee8eb6 (diff)
downloadlinux-e4c9062717feda88900b566463228d1c4910af6d.tar.xz
Input: elantech - fix protocol errors for some trackpoints in SMBus mode
There are some version of Elan trackpads that send incorrect data when in SMbus mode, unless they are switched to use 0x5f reports instead of standard 0x5e. This patch implements querying device to retrieve chips identifying data, and switching it, when needed to the alternative report. Signed-off-by: Jingle Wu <jingle.wu@emc.com.tw> Link: https://lore.kernel.org/r/20201211071531.32413-1-jingle.wu@emc.com.tw Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Diffstat (limited to 'drivers/input/mouse/elantech.h')
-rw-r--r--drivers/input/mouse/elantech.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/input/mouse/elantech.h b/drivers/input/mouse/elantech.h
index e0a3e59d4f1b..571e6ca11d33 100644
--- a/drivers/input/mouse/elantech.h
+++ b/drivers/input/mouse/elantech.h
@@ -18,6 +18,7 @@
#define ETP_CAPABILITIES_QUERY 0x02
#define ETP_SAMPLE_QUERY 0x03
#define ETP_RESOLUTION_QUERY 0x04
+#define ETP_ICBODY_QUERY 0x05
/*
* Command values for register reading or writing
@@ -140,7 +141,10 @@ struct elantech_device_info {
unsigned char samples[3];
unsigned char debug;
unsigned char hw_version;
+ unsigned char pattern;
unsigned int fw_version;
+ unsigned int ic_version;
+ unsigned int product_id;
unsigned int x_min;
unsigned int y_min;
unsigned int x_max;