mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Yan Li <yan.i.li@intel.com>
To: "linux-input@vger.kernel.org" <linux-input@vger.kernel.org>,
	Takashi Iwai <tiwai@suse.de>,
	"Ding, Jian-feng" <jian-feng.ding@intel.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Dmitry Torokhov <dmitry.torokhov@gmail.com>,
	"meego-kernel@lists.meego.com" <meego-kernel@lists.meego.com>
Subject: [PATCH v2] Input: Bug 18122 - Support Lenovo S10-3t's 2-button ClickPad
Date: Tue, 30 Nov 2010 15:44:06 +0800	[thread overview]
Message-ID: <ddb890ce98e91c7422da64168b1624c1e62a02ee.1291101955.git.yan.i.li@intel.com> (raw)
In-Reply-To: <aefc1833eeede37ae6ea4a9ddeaa602eb7d31101.1290823698.git.yan.i.li@intel.com>

This is for kernel bug #18122 and MeeGo bug #4807, version 2.

Lenovo S10-3t's ClickPad is a 2-button ClickPad that reports BTN_LEFT
and BTN_RIGHT as normal touchpad, unlike the 1-button ClickPad used in
HP mini 210 that reports solely BTN_MIDDLE.

Of c0-cap response, the 1-button ClickPad has the 20-bit set while
2-button ClickPad has the 8-bit set.

This patch makes the kernel only handle 1-button ClickPad specially,
and treat 2-button ClickPad as same as other normal touchpads.

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

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 */
-- 
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

  parent reply	other threads:[~2010-11-30  7:44 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-11-27  3:56 [PATCH] Input: Lenovo S10-3t's touchpad support Yan Li
2010-11-27  7:55 ` Dmitry Torokhov
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 ` Yan Li [this message]
2010-11-30  7:50   ` [PATCH v2] Input: Bug 18122 - Support Lenovo S10-3t's 2-button ClickPad 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ddb890ce98e91c7422da64168b1624c1e62a02ee.1291101955.git.yan.i.li@intel.com \
    --to=yan.i.li@intel.com \
    --cc=dmitry.torokhov@gmail.com \
    --cc=jian-feng.ding@intel.com \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=meego-kernel@lists.meego.com \
    --cc=tiwai@suse.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®