diff mbox

[Precise,SRU] pull-request: fixCypress PS/2 Trackpad tap-to-click

Message ID 1348094461.6818.50.camel@fourier
State New
Headers show

Pull-request

git://kernel.ubuntu.com/kamal/ubuntu-precise.git cypress-lp1048816

Commit Message

Kamal Mostafa Sept. 19, 2012, 10:41 p.m. UTC
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(+)

Comments

Tim Gardner Sept. 20, 2012, 12:48 p.m. UTC | #1

Colin Ian King Sept. 20, 2012, 1:16 p.m. UTC | #2
On 19/09/12 23:41, Kamal Mostafa wrote:
> 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(+)
>
> 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;
>
>
>
>
Seems reasonable to me.

Acked-by: Colin Ian King <colin.king@canonical.com>
Tim Gardner Sept. 20, 2012, 1:44 p.m. UTC | #3
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

- -- 
Tim Gardner tim.gardner@canonical.com
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://www.enigmail.net/

iQIcBAEBCgAGBQJQWx3FAAoJED12yEX6FEfKhKQP+gKuXNkl/QCe/pN3domqw4lh
50Dl3aiOzBw8RO5v/Rmuxle3rsYYansfxzFZ3oIfOYwCFLlSiQ3vPtiM8MClFHz4
te1X0/xErezSgZrrUI6EkPPImFoYRQ4/lEXFudIcN9H9X8SjI0FQl7HE1eylnKEa
vhfncbR4wkoVTB5J4AWFLvDTIK+AHrCWhbBIHu99oCVtjjPfrC1B3+XuKsUVX9pS
o5EjF/sX5IN4cr3VInIHN9aw4aj1SJTSdIpR8xk73/LtHfrypMrbouuZJ190W59g
W3i/8pajVeJ/RvMek7UqK1TLK1O54V+g9iU2ffrshdPnZS6WN1SXXeqbbNGvnIhK
zPv0aQJzBs1IUP2jvMitA0yiBcj+g+u7mAfILvKmG+BaG6EDWBTlD0PGEFyzS7d4
pWHMn9aMvzsofdSWvZcTl1wq6FvkeoRcQdBnBzVrWBMYPv0U7qiDZ3Tg3TANWZDO
eUgso8EeX2ydtIKXMK7kjo4kKBvsQGFWcdQPlWlzrozLDw0+E3T3LIi27uDa+QiJ
fpxGKRGvnoQGPTabVuMfT69kxZpMhL284R8s6HcNO9G/mwK2KqOiu6fEo1QPDU/g
fVPvETUy0cVGPqf8q8Cc1Lf/R7Ffx1cluoNZVOPv55rEbghK8AwmOK5g+kggA/gp
QzFk5lUFL2YTvhkU17cg
=Yeby
-----END PGP SIGNATURE-----
diff mbox

Patch

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;