From da0a8de9c2f5491bdf69f4e712d4221cca87ea6b Mon Sep 17 00:00:00 2001 From: Kyle Fazzari Date: Mon, 8 Oct 2012 18:02:37 -0400 Subject: [PATCH] UBUNTU: SAUCE: Cypress PS/2 Trackpad fix taps turning into hardware clicks Fix "Cypress trackpad: Occasional taps leak through as clicks even with tap-to-click disabled" by ensuring that the tap bit in the header is handled even if the trackpad reports the number of fingers in contact to be zero. This change allows already existent code further on in the parser to make sure that the tap does not turn into a click. BugLink: https://bugs.launchpad.net/dell-sputnik/+bug/1064086 Signed-off-by: Kyle Fazzari --- drivers/input/mouse/cypress_ps2.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/input/mouse/cypress_ps2.c b/drivers/input/mouse/cypress_ps2.c index c3752be..77a39cd 100644 --- a/drivers/input/mouse/cypress_ps2.c +++ b/drivers/input/mouse/cypress_ps2.c @@ -622,13 +622,12 @@ static int cypress_parse_packet(const unsigned char packet[], cytp_dbg("cypress_parse_packet: received invalid packet.\n"); } + report_data->tap = (header_byte & ABS_MULTIFINGER_TAP) ? 1 : 0; + /* Remove HSCROLL bit */ if (report_data->contact_cnt == 4) header_byte &= ~(ABS_HSCROLL_BIT); - if (report_data->contact_cnt > 0) - report_data->tap = (header_byte & ABS_MULTIFINGER_TAP) ? 1 : 0; - if (report_data->contact_cnt == 1) { report_data->contacts[0].x = ((packet[1] & 0x70) << 4) | packet[2]; -- 1.7.9.5