Commit f45aaae6 authored by Nate Yocom's avatar Nate Yocom Committed by Dmitry Torokhov

Input: xpad - add X-Box Adaptive XBox button

Adaptive controller sets 0x02 bit for this button, all others set 0x01
so presence of either is used for BTN_MODE.
Signed-off-by: default avatarNate Yocom <nate@yocom.org>
Tested-by: default avatarBastien Nocera <hadess@hadess.net>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com
Link: https://lore.kernel.org/r/20220908173930.28940-3-nate@yocom.orgSigned-off-by: default avatarDmitry Torokhov <dmitry.torokhov@gmail.com>
parent d218fe04
...@@ -969,7 +969,8 @@ static void xpadone_process_packet(struct usb_xpad *xpad, u16 cmd, unsigned char ...@@ -969,7 +969,8 @@ static void xpadone_process_packet(struct usb_xpad *xpad, u16 cmd, unsigned char
if (data[1] == (GIP_OPT_ACK | GIP_OPT_INTERNAL)) if (data[1] == (GIP_OPT_ACK | GIP_OPT_INTERNAL))
xpadone_ack_mode_report(xpad, data[2]); xpadone_ack_mode_report(xpad, data[2]);
input_report_key(dev, BTN_MODE, data[4] & BIT(0)); input_report_key(dev, BTN_MODE, data[4] & GENMASK(1, 0));
input_sync(dev);
do_sync = true; do_sync = true;
} else if (data[0] == GIP_CMD_FIRMWARE) { } else if (data[0] == GIP_CMD_FIRMWARE) {
......
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