Skip to content

Commit 92bac83

Browse files
jwrdegoededtor
authored andcommitted
Input: alps - non interleaved V2 dualpoint has separate stick button bits
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 <jmdebruin@xmsnet.nl> Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
1 parent 6bcca19 commit 92bac83

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

drivers/input/mouse/alps.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -243,6 +243,14 @@ static void alps_process_packet_v1_v2(struct psmouse *psmouse)
243243
return;
244244
}
245245

246+
/* Non interleaved V2 dualpoint has separate stick button bits */
247+
if (priv->proto_version == ALPS_PROTO_V2 &&
248+
priv->flags == (ALPS_PASS | ALPS_DUALPOINT)) {
249+
left |= packet[0] & 1;
250+
right |= packet[0] & 2;
251+
middle |= packet[0] & 4;
252+
}
253+
246254
alps_report_buttons(dev, dev2, left, right, middle);
247255

248256
/* Convert hardware tap to a reasonable Z value */

0 commit comments

Comments
 (0)