]> Git Repo - linux.git/commitdiff
Input: alps - non interleaved V2 dualpoint has separate stick button bits
authorHans de Goede <[email protected]>
Sun, 12 Apr 2015 22:42:35 +0000 (15:42 -0700)
committerDmitry Torokhov <[email protected]>
Sun, 12 Apr 2015 22:44:15 +0000 (15:44 -0700)
Non interleaved V2 dualpoint touchpad / stick combos have separate stick
button bits in the touchpad packets, if we do not check these then the
trackpoint buttons will not work when using the touchpad, and when pressed
when the user starts using the touchpad will report a release event even
though the button is still pressed.

This commit fixes this by checking the separate bits, note that we simply
combine the buttons, since the hardware does the same when using the touchpad
buttons with the trackpoint, so we do not have enough information to properly
separate them.

Reported-by: Hans de Bruin <[email protected]>
Signed-off-by: Hans de Goede <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
drivers/input/mouse/alps.c

index ea6cb64dfb289afe590fa446e0d0c60d03ddedbd..da3af8db697cd61ab4ee0c4440f76b3168b2d759 100644 (file)
@@ -243,6 +243,14 @@ static void alps_process_packet_v1_v2(struct psmouse *psmouse)
                return;
        }
 
+       /* Non interleaved V2 dualpoint has separate stick button bits */
+       if (priv->proto_version == ALPS_PROTO_V2 &&
+           priv->flags == (ALPS_PASS | ALPS_DUALPOINT)) {
+               left |= packet[0] & 1;
+               right |= packet[0] & 2;
+               middle |= packet[0] & 4;
+       }
+
        alps_report_buttons(dev, dev2, left, right, middle);
 
        /* Convert hardware tap to a reasonable Z value */
This page took 0.048617 seconds and 4 git commands to generate.