Commit 47e6fb42 authored by Masaki Ota's avatar Masaki Ota Committed by Dmitry Torokhov

Input: ALPS - fix trackstick button handling on V8 devices

Alps stick devices always have physical buttons, so we should not check
ALPS_BUTTONPAD flag to decide whether we should report them.

Fixes: 4777ac22 ("Input: ALPS - add touchstick support for SS5 hardware")
Signed-off-by: default avatarMasaki Ota <masaki.ota@jp.alps.com>
Acked-by: default avatarPali Rohar <pali.rohar@gmail.com>
Tested-by: default avatarPaul Donohue <linux-kernel@PaulSD.com>
Tested-by: default avatarNick Fletcher <nick.m.fletcher@gmail.com>
Cc: stable@vger.kernel.org
Signed-off-by: default avatarDmitry Torokhov <dmitry.torokhov@gmail.com>
parent e7348396
...@@ -1282,10 +1282,8 @@ static int alps_decode_ss4_v2(struct alps_fields *f, ...@@ -1282,10 +1282,8 @@ static int alps_decode_ss4_v2(struct alps_fields *f,
/* handle buttons */ /* handle buttons */
if (pkt_id == SS4_PACKET_ID_STICK) { if (pkt_id == SS4_PACKET_ID_STICK) {
f->ts_left = !!(SS4_BTN_V2(p) & 0x01); f->ts_left = !!(SS4_BTN_V2(p) & 0x01);
if (!(priv->flags & ALPS_BUTTONPAD)) { f->ts_right = !!(SS4_BTN_V2(p) & 0x02);
f->ts_right = !!(SS4_BTN_V2(p) & 0x02); f->ts_middle = !!(SS4_BTN_V2(p) & 0x04);
f->ts_middle = !!(SS4_BTN_V2(p) & 0x04);
}
} else { } else {
f->left = !!(SS4_BTN_V2(p) & 0x01); f->left = !!(SS4_BTN_V2(p) & 0x01);
if (!(priv->flags & ALPS_BUTTONPAD)) { if (!(priv->flags & ALPS_BUTTONPAD)) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment