From patchwork Wed Sep 19 22:41:01 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [Precise,SRU] pull-request: fixCypress PS/2 Trackpad tap-to-click From: Kamal Mostafa X-Patchwork-Id: 185241 Message-Id: <1348094461.6818.50.camel@fourier> To: kernel-team@lists.ubuntu.com Date: Wed, 19 Sep 2012 15:41:01 -0700 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;