From patchwork Sat Nov 27 03:56:59 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yan Li X-Patchwork-Id: 360282 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id oAR3vJxP005984 for ; Sat, 27 Nov 2010 03:57:19 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751091Ab0K0D5E (ORCPT ); Fri, 26 Nov 2010 22:57:04 -0500 Received: from mga09.intel.com ([134.134.136.24]:6921 "EHLO mga09.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750994Ab0K0D5D (ORCPT ); Fri, 26 Nov 2010 22:57:03 -0500 Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga102.jf.intel.com with ESMTP; 26 Nov 2010 19:57:02 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.59,264,1288594800"; d="scan'208";a="681417799" Received: from sage.bj.intel.com ([10.238.154.183]) by orsmga001.jf.intel.com with ESMTP; 26 Nov 2010 19:57:01 -0800 Received: from liyan by sage.bj.intel.com with local (Exim 4.72) (envelope-from ) id 1PMBuF-0007jS-Vs; Sat, 27 Nov 2010 11:56:59 +0800 Date: Sat, 27 Nov 2010 11:56:59 +0800 From: Yan Li To: linux-input@vger.kernel.org, Takashi Iwai , jian-feng.ding@intel.com, linux-kernel@vger.kernel.org, Dmitry Torokhov , meego-kernel@lists.meego.com Subject: [PATCH] Input: Lenovo S10-3t's touchpad support Message-ID: MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.20 (2009-06-14) Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter1.kernel.org [140.211.167.41]); Sat, 27 Nov 2010 03:57:19 +0000 (UTC) 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 --- 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 */