From patchwork Tue Nov 30 07:44:06 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yan Li X-Patchwork-Id: 366161 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 oAU7iBdb021027 for ; Tue, 30 Nov 2010 07:44:12 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754094Ab0K3HoK (ORCPT ); Tue, 30 Nov 2010 02:44:10 -0500 Received: from mga14.intel.com ([143.182.124.37]:28690 "EHLO mga14.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754011Ab0K3HoJ (ORCPT ); Tue, 30 Nov 2010 02:44:09 -0500 Received: from azsmga001.ch.intel.com ([10.2.17.19]) by azsmga102.ch.intel.com with ESMTP; 29 Nov 2010 23:44:08 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.59,279,1288594800"; d="scan'208";a="354841112" Received: from sage.bj.intel.com ([10.238.154.160]) by azsmga001.ch.intel.com with ESMTP; 29 Nov 2010 23:44:07 -0800 Received: from liyan by sage.bj.intel.com with local (Exim 4.72) (envelope-from ) id 1PNKsg-0004jl-Dg; Tue, 30 Nov 2010 15:44:06 +0800 Date: Tue, 30 Nov 2010 15:44:06 +0800 From: Yan Li To: "linux-input@vger.kernel.org" , Takashi Iwai , "Ding, Jian-feng" , "linux-kernel@vger.kernel.org" , Dmitry Torokhov , "meego-kernel@lists.meego.com" Subject: [PATCH v2] Input: Bug 18122 - Support Lenovo S10-3t's 2-button ClickPad Message-ID: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: 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]); Tue, 30 Nov 2010 07:44:12 +0000 (UTC) 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 */