From patchwork Wed Sep 19 22:41:01 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kamal Mostafa X-Patchwork-Id: 185241 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 2F6292C0091 for ; Thu, 20 Sep 2012 08:40:50 +1000 (EST) Received: from localhost ([127.0.0.1] helo=chlorine.canonical.com) by chlorine.canonical.com with esmtp (Exim 4.71) (envelope-from ) id 1TESuc-0006br-CD; Wed, 19 Sep 2012 22:38:30 +0000 Received: from youngberry.canonical.com ([91.189.89.112]) by chlorine.canonical.com with esmtp (Exim 4.71) (envelope-from ) id 1TESua-0006bf-TX for kernel-team@lists.ubuntu.com; Wed, 19 Sep 2012 22:38:28 +0000 Received: from c-50-136-208-221.hsd1.ca.comcast.net ([50.136.208.221] helo=[192.168.1.7]) by youngberry.canonical.com with esmtpsa (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1TESwf-0006FC-N5; Wed, 19 Sep 2012 22:40:38 +0000 Message-ID: <1348094461.6818.50.camel@fourier> Subject: [Precise SRU] pull-request: fixCypress PS/2 Trackpad tap-to-click From: Kamal Mostafa To: kernel-team@lists.ubuntu.com Date: Wed, 19 Sep 2012 15:41:01 -0700 X-Mailer: Evolution 3.2.3-0ubuntu6 Mime-Version: 1.0 X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.13 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: kernel-team-bounces@lists.ubuntu.com Errors-To: kernel-team-bounces@lists.ubuntu.com Bug reference: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1048816 Cypress trackpad: Disable tap-to-click doesn't affect mouse button zones. [IMPACT] This patch to the new Cypress PS/2 Trackpad driver fixes trackpad misbehavior when the user opts to disable tap-to-click. [TESTCASE] To test (requires a Cypress PS/2 Trackpad): 1. Disable tap-to-click in Mouse and Touchpad settings. 2. Tap the touchpad (do not click the physical button) in various places. Notice that when touching the zones above the physical buttons, tap-to-click single clicks are still generated (but not when touching higher up on the pad). 3. Test same with patch applied: observe no extraneous tap-to-click events when that feature has been disabled; tap-to-click works as usual when left enabled. [Regression Potential] None known. This patch affects only the Cypress PS/2 Trackpad driver. Thanks, -Kamal ---------- The following changes since commit 96081f77301b66a75da842e1a26eda6cb57e90e5: Linux 3.2.30 (2012-09-19 16:51:37 -0300) are available in the git repository at: git://kernel.ubuntu.com/kamal/ubuntu-precise.git cypress-lp1048816 for you to fetch changes up to f30675086f6cafc02b53d1ee5983cf2db5e3e6ee: UBUNTU: SAUCE: input: Cypress PS/2 Trackpad fix disabling tap-to-click (2012-09-19 15:30:20 -0700) ---------------------------------------------------------------- Kyle Fazzari (1): UBUNTU: SAUCE: input: Cypress PS/2 Trackpad fix disabling tap-to-click drivers/input/mouse/cypress_ps2.c | 8 ++++++++ 1 file changed, 8 insertions(+) Acked-by: Colin Ian King diff --git a/drivers/input/mouse/cypress_ps2.c b/drivers/input/mouse/cypress_ps2.c index 45afe8f..3a572ec 100644 --- a/drivers/input/mouse/cypress_ps2.c +++ b/drivers/input/mouse/cypress_ps2.c @@ -693,6 +693,14 @@ static int cypress_parse_packet(const unsigned char packet[], } } + /* This is only true if one of the mouse buttons were tapped. + * Make sure it doesn't turn into a click. The regular tap-to- + * click functionality will handle that on its own. If we don't + * do this, disabling tap-to-click won't affect the mouse button + * zones. */ + if (report_data->tap) + report_data->left = 0; + if (report_data->contact_cnt <= 0) return 0;