Input: sentelic - filter taps in absolute mode
authorOskari Saarenmaa <os@ohmu.fi>
Tue, 3 Apr 2012 16:46:32 +0000 (09:46 -0700)
committerTim Gardner <tim.gardner@canonical.com>
Fri, 13 Apr 2012 13:05:25 +0000 (07:05 -0600)
BugLink: http://bugs.launchpad.net/bugs/969334

Taps in absolute positioning single-finger mode are currently reported
as physical clicks by the driver. This should be handled by userspace,
not the kernel.

When a tap occurs, the FSP_PB0_LBTN bit is set, but the FSP_PB0_PHY_BTN
is not. We use this to filter out physical clicks from taps.

Signed-off-by: Oskari Saarenmaa <os@ohmu.fi>
Reviewed-by: Tai-hwa Liang <avatar@sentelic.com>
Reviewed-by: Chase Douglas <chase.douglas@canonical.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
(cherry picked from commit d626dad58f02e13730ded6ac84d6a9e53123f0e8)

Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
Acked-by: Chase Douglas <chase.douglas@canonical.com>

drivers/input/mouse/sentelic.c

index 869efb3..19097f4 100644 (file)
@@ -720,6 +720,14 @@ static psmouse_ret_t fsp_process_byte(struct psmouse *psmouse)
                        }
                } else {
                        /* SFAC packet */
+                       if ((packet[0] & (FSP_PB0_LBTN|FSP_PB0_PHY_BTN)) ==
+                               FSP_PB0_LBTN) {
+                               /* On-pad click in SFAC mode should be handled
+                                * by userspace.  On-pad clicks in MFMC mode
+                                * are real clickpad clicks, and not ignored.
+                                */
+                               packet[0] &= ~FSP_PB0_LBTN;
+                       }
 
                        /* no multi-finger information */
                        ad->last_mt_fgr = 0;