From fec6e5252b542e748871c88f8455e69ae73ea156 Mon Sep 17 00:00:00 2001 From: Henrik Rydberg Date: Tue, 21 Dec 2010 18:11:25 +0100 Subject: 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 Signed-off-by: Chase Douglas Signed-off-by: Chris Bagwell Acked-by: Dmitry Torokhov Signed-off-by: Henrik Rydberg --- drivers/input/mouse/synaptics.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'drivers/input/mouse/synaptics.h') 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); -- cgit v1.2.3-59-g8ed1b