mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 02:32:09 -04:00
Input: xpad - add constants for GIP interface numbers
[ Upstream commit f9b2e603c6216824e34dc9a67205d98ccc9a41ca ] Wired GIP devices present multiple interfaces with the same USB identification other than the interface number. This adds constants for differentiating two of them and uses them where appropriate Signed-off-by: Vicki Pfau <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Dmitry Torokhov <[email protected]> Signed-off-by: Sasha Levin <[email protected]>
This commit is contained in:
parent
9fcef1e37d
commit
e6e917e82d
1 changed files with 4 additions and 1 deletions
|
|
@ -489,6 +489,9 @@ struct xboxone_init_packet {
|
|||
}
|
||||
|
||||
|
||||
#define GIP_WIRED_INTF_DATA 0
|
||||
#define GIP_WIRED_INTF_AUDIO 1
|
||||
|
||||
/*
|
||||
* This packet is required for all Xbox One pads with 2015
|
||||
* or later firmware installed (or present from the factory).
|
||||
|
|
@ -1813,7 +1816,7 @@ static int xpad_probe(struct usb_interface *intf, const struct usb_device_id *id
|
|||
}
|
||||
|
||||
if (xpad->xtype == XTYPE_XBOXONE &&
|
||||
intf->cur_altsetting->desc.bInterfaceNumber != 0) {
|
||||
intf->cur_altsetting->desc.bInterfaceNumber != GIP_WIRED_INTF_DATA) {
|
||||
/*
|
||||
* The Xbox One controller lists three interfaces all with the
|
||||
* same interface class, subclass and protocol. Differentiate by
|
||||
|
|
|
|||
Loading…
Reference in a new issue