linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Input: Lenovo S10-3t's touchpad support
@ 2010-11-27  3:56 Yan Li
  2010-11-27  7:55 ` Dmitry Torokhov
  2010-11-30  7:44 ` [PATCH v2] Input: Bug 18122 - Support Lenovo S10-3t's 2-button ClickPad Yan Li
  0 siblings, 2 replies; 16+ messages in thread
From: Yan Li @ 2010-11-27  3:56 UTC (permalink / raw)
  To: linux-input, Takashi Iwai, jian-feng.ding, linux-kernel,
	Dmitry Torokhov, meego-kernel

This is for kernel bug #18122 and MeeGo bug #4807.

Current code detects Clickpad by checking the 8 and 20 bits of 0x0c
cap. However, the code returns true if either of those bits is 1,
while it should only return true when both are 1. This has lead to the
touchpad on Lenovo S10-3t be mistakenly recognized as Clickpad and its
BTN_LEFT and BTN_RIGHT blocked.

So far we've found that the S10-3ts are shipped with two slightly
different models of touchpads, of which the 0x0c cap is either
0x5a0400 or 0x4a0500. They are not Clickpad and return BTN_LEFT and
BTN_RIGHT normally.

This patch fixed this issue by checking both sign bits are 1. Tested
on my S10-3t and worked well.

Signed-off-by: Yan Li <yan.i.li@intel.com>
---
 drivers/input/mouse/synaptics.h |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/drivers/input/mouse/synaptics.h b/drivers/input/mouse/synaptics.h
index 613a365..0c1083c 100644
--- a/drivers/input/mouse/synaptics.h
+++ b/drivers/input/mouse/synaptics.h
@@ -51,7 +51,11 @@
 #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)
+/* Synaptics' ClickPad has both 8th and 20th bits set in the 0x0c
+ * cap. Other models (like those shipped with Lenovo S10-3t) may have
+ * either one of them set but not both, and they are *not* ClickPad
+ * although they look similar. */
+#define SYN_CAP_CLICKPAD(ex0c)		((ex0c) & 0x100100 == 0x100100)
 #define SYN_CAP_MAX_DIMENSIONS(ex0c)	((ex0c) & 0x020000)
 
 /* synaptics modes query bits */
-- 
1.7.2.3


-- 
Best regards,
Li, Yan

MeeGo Team, Opensource Technology Center, SSG, Intel
Office tel.: +86-10-82171695 (inet: 8-758-1695)
OpenPGP key: 5C6C31EF
IRC: yanli on network irc.freenode.net

^ permalink raw reply related	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2010-12-01  8:01 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-11-27  3:56 [PATCH] Input: Lenovo S10-3t's touchpad support Yan Li
2010-11-27  7:55 ` Dmitry Torokhov
2010-11-29  8:53   ` Yan I Li
2010-11-30  2:18   ` Li, Yan I
2010-11-30  7:12     ` Takashi Iwai
2010-11-30  8:09       ` Li, Yan I
2010-11-30  7:44 ` [PATCH v2] Input: Bug 18122 - Support Lenovo S10-3t's 2-button ClickPad Yan Li
2010-11-30  7:50   ` Dmitry Torokhov
2010-11-30  8:08     ` Li, Yan I
2010-11-30 15:48       ` Tobyn Bertram
2010-12-01  4:11         ` Li, Yan I
2010-12-01  6:04           ` Takashi Iwai
     [not found]             ` <BAY130-W15C8BF6B2994FAE083FAF5DE260@phx.gbl>
2010-12-01  7:18               ` Li, Yan I
2010-12-01  7:23                 ` Dmitry Torokhov
2010-12-01  7:46           ` Dmitry Torokhov
2010-12-01  8:01             ` Li, Yan I

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).