diff mbox

[v2] Input: Bug 18122 - Support Lenovo S10-3t's 2-button ClickPad

Message ID ddb890ce98e91c7422da64168b1624c1e62a02ee.1291101955.git.yan.i.li@intel.com (mailing list archive)
State New, archived
Headers show

Commit Message

Yan Li Nov. 30, 2010, 7:44 a.m. UTC
None
diff mbox

Patch

diff --git a/drivers/input/mouse/synaptics.h b/drivers/input/mouse/synaptics.h
index 613a365..20468b6 100644
--- a/drivers/input/mouse/synaptics.h
+++ b/drivers/input/mouse/synaptics.h
@@ -51,7 +51,13 @@ 
 #define SYN_EXT_CAP_REQUESTS(c)		(((c) & 0x700000) >> 20)
 #define SYN_CAP_MULTI_BUTTON_NO(ec)	(((ec) & 0x00f000) >> 12)
 #define SYN_CAP_PRODUCT_ID(ec)		(((ec) & 0xff0000) >> 16)
-#define SYN_CAP_CLICKPAD(ex0c)		((ex0c) & 0x100100)
+/* This macro detects 1-button ClickPad. Of ex0c capacity, if the
+ * 20-bit of ex0c is set the touchpad is a 1-button ClickPad, which
+ * needs special handling because it reports only BTN_MIDDLE.  If the
+ * 8-bit is set it is a 2-button ClickPad which reports BTN_* events
+ * normally and needs no special handling. Therefore this macro
+ * detects 1-button ClickPad only.  */
+#define SYN_CAP_CLICKPAD(ex0c)		((ex0c) & 0x100000)
 #define SYN_CAP_MAX_DIMENSIONS(ex0c)	((ex0c) & 0x020000)
 
 /* synaptics modes query bits */