summaryrefslogtreecommitdiff
path: root/drivers/input/mouse/elantech.h
diff options
context:
space:
mode:
authorJJ Ding <jj_ding@emc.com.tw>2011-09-09 10:30:31 -0700
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2011-09-09 10:34:58 -0700
commit28f49616113f3a1fbef789319bfd2122d0c3663f (patch)
tree5f0dba8f912dfcd19c0457bc4b2c8c3a823f9757 /drivers/input/mouse/elantech.h
parent3c8bbb951ab23dc1192473ccad76cde89c172d27 (diff)
Input: elantech - add v3 hardware support
v3 hardware's packet format is almost identical to v2 (one/three finger touch), except when sensing two finger touch, the hardware sends 12 bytes of data. Signed-off-by: JJ Ding <jj_ding@emc.com.tw> Acked-by: Daniel Kurtz <djkurtz@chromium.org> Acked-by: Éric Piel <eric.piel@tremplin-utc.net> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Diffstat (limited to 'drivers/input/mouse/elantech.h')
-rw-r--r--drivers/input/mouse/elantech.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/drivers/input/mouse/elantech.h b/drivers/input/mouse/elantech.h
index d9e614409f92..236c33cdc708 100644
--- a/drivers/input/mouse/elantech.h
+++ b/drivers/input/mouse/elantech.h
@@ -16,6 +16,7 @@
/*
* Command values for Synaptics style queries
*/
+#define ETP_FW_ID_QUERY 0x00
#define ETP_FW_VERSION_QUERY 0x01
#define ETP_CAPABILITIES_QUERY 0x02
@@ -24,6 +25,7 @@
*/
#define ETP_REGISTER_READ 0x10
#define ETP_REGISTER_WRITE 0x11
+#define ETP_REGISTER_READWRITE 0x00
/*
* Hardware version 2 custom PS/2 command value
@@ -79,6 +81,14 @@
#define ETP_WMIN_V2 0
#define ETP_WMAX_V2 15
+/*
+ * v3 hardware has 2 kinds of packet types.
+ */
+#define PACKET_UNKNOWN 0x01
+#define PACKET_DEBOUNCE 0x02
+#define PACKET_V3_HEAD 0x03
+#define PACKET_V3_TAIL 0x04
+
struct elantech_data {
unsigned char reg_10;
unsigned char reg_11;
@@ -98,6 +108,8 @@ struct elantech_data {
unsigned int fw_version;
unsigned int single_finger_reports;
unsigned int y_max;
+ unsigned int prev_x;
+ unsigned int prev_y;
unsigned char parity[256];
};