summaryrefslogtreecommitdiffstats
path: root/drivers/input/mouse/synaptics.h
diff options
context:
space:
mode:
authorHenrik Rydberg <rydberg@euromail.se>2010-12-21 18:11:25 +0100
committerHenrik Rydberg <rydberg@euromail.se>2010-12-21 18:11:25 +0100
commitfec6e5252b542e748871c88f8455e69ae73ea156 (patch)
tree6d159877951139e8b574e3384ae37a15da471495 /drivers/input/mouse/synaptics.h
parentc14890a8e54977f895773d393d6a640d6d698fb8 (diff)
downloadtalos-op-linux-fec6e5252b542e748871c88f8455e69ae73ea156.tar.gz
talos-op-linux-fec6e5252b542e748871c88f8455e69ae73ea156.zip
Input: synaptics - add multi-finger and semi-mt support
The Synaptics 2.7 series of touchpads support a mode for reporting two sets of X/Y/Pressure data (advanced gesture mode). By default, these devices report only single finger data, depriving userspace of the nowadays ubiquitous two-finger scroll gesture. Enabling advanced gesture mode also enables the multi-finger report, although the device does not claim that capability. Up to three fingers can be reported this way. While two or three fingers are touching, the normal packet is prepended by a reduced finger packet of lower resolution. From the two packets (which do not represent the actual fingers), the bounding rectangle of the individual contacts can be extracted. This information is sufficient to perform scaling gestures and a limited form of rotation gesture. The behavior has been coined semi-mt capability, and is signaled to userspace via the INPUT_PROP_SEMI_MT device property. Work to decode the advanced gesture packet: Takashi Iwai. Cleanup and testing of the original patch: Chase Douglas. Minor cleanup and testing: Chris Bagwell. Finalization and semi-mt support: Henrik Rydberg. Reported-by: Tobyn Bertram Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Chase Douglas <chase.douglas@canonical.com> Signed-off-by: Chris Bagwell <chris@cnpbagwell.com> Acked-by: Dmitry Torokhov <dtor@mail.ru> Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
Diffstat (limited to 'drivers/input/mouse/synaptics.h')
-rw-r--r--drivers/input/mouse/synaptics.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/input/mouse/synaptics.h b/drivers/input/mouse/synaptics.h
index 613a3652f98f..50e20e9da442 100644
--- a/drivers/input/mouse/synaptics.h
+++ b/drivers/input/mouse/synaptics.h
@@ -53,6 +53,7 @@
#define SYN_CAP_PRODUCT_ID(ec) (((ec) & 0xff0000) >> 16)
#define SYN_CAP_CLICKPAD(ex0c) ((ex0c) & 0x100100)
#define SYN_CAP_MAX_DIMENSIONS(ex0c) ((ex0c) & 0x020000)
+#define SYN_CAP_ADV_GESTURE(ex0c) ((ex0c) & 0x080000)
/* synaptics modes query bits */
#define SYN_MODE_ABSOLUTE(m) ((m) & (1 << 7))
@@ -112,6 +113,8 @@ struct synaptics_data {
int scroll;
struct serio *pt_port; /* Pass-through serio port */
+
+ struct synaptics_hw_state mt; /* current gesture packet */
};
void synaptics_module_init(void);
OpenPOWER on IntegriCloud