Skip to content

Commit cf59501

Browse files
endriftdtor
authored andcommitted
Input: xpad - fix PowerA EnWired Controller guide button
This commit explicitly disables the audio interface the same way the official driver does. This is needed for some controllers, such as the PowerA Enhanced Wired Controller for Series X|S (0x20d6:0x200e) to report the guide button. Signed-off-by: Vicki Pfau <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Dmitry Torokhov <[email protected]>
1 parent f9b2e60 commit cf59501

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

drivers/input/joystick/xpad.c

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1396,6 +1396,21 @@ static int xpad_start_xbox_one(struct usb_xpad *xpad)
13961396
unsigned long flags;
13971397
int retval;
13981398

1399+
if (usb_ifnum_to_if(xpad->udev, GIP_WIRED_INTF_AUDIO)) {
1400+
/*
1401+
* Explicitly disable the audio interface. This is needed
1402+
* for some controllers, such as the PowerA Enhanced Wired
1403+
* Controller for Series X|S (0x20d6:0x200e) to report the
1404+
* guide button.
1405+
*/
1406+
retval = usb_set_interface(xpad->udev,
1407+
GIP_WIRED_INTF_AUDIO, 0);
1408+
if (retval)
1409+
dev_warn(&xpad->dev->dev,
1410+
"unable to disable audio interface: %d\n",
1411+
retval);
1412+
}
1413+
13991414
spin_lock_irqsave(&xpad->odata_lock, flags);
14001415

14011416
/*

0 commit comments

Comments
 (0)