summaryrefslogtreecommitdiff
path: root/drivers/input/mouse/elantech.h
diff options
context:
space:
mode:
authorJJ Ding <jj_ding@emc.com.tw>2011-09-09 10:31:58 -0700
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2011-09-09 10:35:02 -0700
commit1dc6edec127e1fdb89d246189c232fe635d2f921 (patch)
treeed12c72185f5124ae9ef8cfb2e6cc01dc4e12b45 /drivers/input/mouse/elantech.h
parent28f49616113f3a1fbef789319bfd2122d0c3663f (diff)
Input: elantech - add v4 hardware support
v4 hardware is a true multitouch capable touchpad (up to 5 fingers). The packet format is quite complex, please see protocol document for reference. Signed-off-by: JJ Ding <jj_ding@emc.com.tw> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Diffstat (limited to 'drivers/input/mouse/elantech.h')
-rw-r--r--drivers/input/mouse/elantech.h29
1 files changed, 26 insertions, 3 deletions
diff --git a/drivers/input/mouse/elantech.h b/drivers/input/mouse/elantech.h
index 236c33cdc708..7ecaef0c07c4 100644
--- a/drivers/input/mouse/elantech.h
+++ b/drivers/input/mouse/elantech.h
@@ -82,14 +82,37 @@
#define ETP_WMAX_V2 15
/*
- * v3 hardware has 2 kinds of packet types.
+ * v3 hardware has 2 kinds of packet types,
+ * v4 hardware has 3.
*/
#define PACKET_UNKNOWN 0x01
#define PACKET_DEBOUNCE 0x02
#define PACKET_V3_HEAD 0x03
#define PACKET_V3_TAIL 0x04
+#define PACKET_V4_HEAD 0x05
+#define PACKET_V4_MOTION 0x06
+#define PACKET_V4_STATUS 0x07
+
+/*
+ * track up to 5 fingers for v4 hardware
+ */
+#define ETP_MAX_FINGERS 5
+
+/*
+ * weight value for v4 hardware
+ */
+#define ETP_WEIGHT_VALUE 5
+
+/*
+ * The base position for one finger, v4 hardware
+ */
+struct finger_pos {
+ unsigned int x;
+ unsigned int y;
+};
struct elantech_data {
+ unsigned char reg_07;
unsigned char reg_10;
unsigned char reg_11;
unsigned char reg_20;
@@ -108,8 +131,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 int width;
+ struct finger_pos mt[ETP_MAX_FINGERS];
unsigned char parity[256];
};