From patchwork Thu Dec 9 10:33:14 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Manoj Iyer X-Patchwork-Id: 74871 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from chlorine.canonical.com (chlorine.canonical.com [91.189.94.204]) by ozlabs.org (Postfix) with ESMTP id CD398B70AF for ; Thu, 9 Dec 2010 21:33:36 +1100 (EST) Received: from localhost ([127.0.0.1] helo=chlorine.canonical.com) by chlorine.canonical.com with esmtp (Exim 4.69) (envelope-from ) id 1PQdoP-00053C-Lb; Thu, 09 Dec 2010 10:33:21 +0000 Received: from adelie.canonical.com ([91.189.90.139]) by chlorine.canonical.com with esmtp (Exim 4.69) (envelope-from ) id 1PQdoM-00052g-UG for kernel-team@lists.ubuntu.com; Thu, 09 Dec 2010 10:33:18 +0000 Received: from hutte.canonical.com ([91.189.90.181]) by adelie.canonical.com with esmtp (Exim 4.69 #1 (Debian)) id 1PQdoL-00080s-R4; Thu, 09 Dec 2010 10:33:17 +0000 Received: from [91.189.88.12] (helo=canonical.com) by hutte.canonical.com with esmtpsa (TLS-1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.69) (envelope-from ) id 1PQdoL-0006Oj-Pi; Thu, 09 Dec 2010 10:33:17 +0000 From: Manoj Iyer To: kernel-team@lists.ubuntu.com Subject: [PATCH] Input: synaptics - fix handling of 2-button ClickPads Date: Thu, 9 Dec 2010 10:33:14 +0000 Message-Id: <1291890794-3319-2-git-send-email-manoj.iyer@canonical.com> X-Mailer: git-send-email 1.7.1 In-Reply-To: <1291890794-3319-1-git-send-email-manoj.iyer@canonical.com> References: <1291890794-3319-1-git-send-email-manoj.iyer@canonical.com> Cc: Yan Li , Dmitry Torokhov X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.9 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: kernel-team-bounces@lists.ubuntu.com Errors-To: kernel-team-bounces@lists.ubuntu.com From: Yan Li 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. In 0xc0-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 in the same fashion as regular touchpads. This fixes kernel bug #18122 and MeeGo bug #4807. Signed-off-by: Yan Li Signed-off-by: Dmitry Torokhov (cherry picked from commit 3bfa321e662edf90fb8123a02c987c2965fa50bb) Signed-off-by: Manoj Iyer BugLink: http://launchpad.net/bugs/687750 Acked-By: Stefan Bader --- drivers/input/mouse/synaptics.h | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/drivers/input/mouse/synaptics.h b/drivers/input/mouse/synaptics.h index 80907d0..63fb598 100644 --- a/drivers/input/mouse/synaptics.h +++ b/drivers/input/mouse/synaptics.h @@ -51,7 +51,8 @@ #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) +#define SYN_CAP_CLICKPAD(ex0c) ((ex0c) & 0x100000) /* 1-button ClickPad */ +#define SYN_CAP_CLICKPAD2BTN(ex0c) ((ex0c) & 0x000100) /* 2-button ClickPad */ #define SYN_CAP_MAX_DIMENSIONS(ex0c) ((ex0c) & 0x020000) /* synaptics modes query bits */