aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHans de Goede <hdegoede@redhat.com>2015-04-12 18:42:35 -0400
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2015-04-12 18:44:15 -0400
commit92bac83dd79e60e65c475222e41a992a70434beb (patch)
tree1b07073ffe48139a25df597ca07ea5ac23754501
parent6bcca19f5dcedc3a006ca0bcc3699a437cadee74 (diff)
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>
-rw-r--r--drivers/input/mouse/alps.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/input/mouse/alps.c b/drivers/input/mouse/alps.c
index ea6cb64dfb28..da3af8db697c 100644
--- a/drivers/input/mouse/alps.c
+++ b/drivers/input/mouse/alps.c
@@ -243,6 +243,14 @@ static void alps_process_packet_v1_v2(struct psmouse *psmouse)
243 return; 243 return;
244 } 244 }
245 245
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
246 alps_report_buttons(dev, dev2, left, right, middle); 254 alps_report_buttons(dev, dev2, left, right, middle);
247 255
248 /* Convert hardware tap to a reasonable Z value */ 256 /* Convert hardware tap to a reasonable Z value */