mirror of
https://github.com/followmsi/android_kernel_google_msm.git
synced 2024-11-06 23:17:41 +00:00
usb: diag_bridge: Support PID 9079
Add support for PID 0x9079 and also designate device IDs per-PID. 9079, having a device ID of 1, is intended to be able to coexist with another probed device with device ID 0. Change-Id: Ib8cc52a9277b0013e098baeaafa6fce1c8498c42 Signed-off-by: Jack Pham <jackp@codeaurora.org>
This commit is contained in:
parent
ed135fe15d
commit
ed2f609893
1 changed files with 10 additions and 8 deletions
|
@ -434,12 +434,10 @@ diag_bridge_probe(struct usb_interface *ifc, const struct usb_device_id *id)
|
|||
ifc_num = ifc->cur_altsetting->desc.bInterfaceNumber;
|
||||
|
||||
/* is this interface supported ? */
|
||||
if (ifc_num != id->driver_info)
|
||||
if (ifc_num != (id->driver_info & 0xFF))
|
||||
return -ENODEV;
|
||||
|
||||
/* This needs to figure out ID based on PID and/or host bus type */
|
||||
devid = 0;
|
||||
|
||||
devid = (id->driver_info >> 8) & 0xFF;
|
||||
if (devid < 0 || devid >= MAX_DIAG_BRIDGE_DEVS)
|
||||
return -ENODEV;
|
||||
|
||||
|
@ -548,15 +546,19 @@ static int diag_bridge_resume(struct usb_interface *ifc)
|
|||
}
|
||||
|
||||
#define VALID_INTERFACE_NUM 0
|
||||
#define DEV_ID(n) ((n)<<8)
|
||||
|
||||
static const struct usb_device_id diag_bridge_ids[] = {
|
||||
{ USB_DEVICE(0x5c6, 0x9001),
|
||||
.driver_info = VALID_INTERFACE_NUM, },
|
||||
.driver_info = VALID_INTERFACE_NUM | DEV_ID(0), },
|
||||
{ USB_DEVICE(0x5c6, 0x9034),
|
||||
.driver_info = VALID_INTERFACE_NUM, },
|
||||
.driver_info = VALID_INTERFACE_NUM | DEV_ID(0), },
|
||||
{ USB_DEVICE(0x5c6, 0x9048),
|
||||
.driver_info = VALID_INTERFACE_NUM, },
|
||||
.driver_info = VALID_INTERFACE_NUM | DEV_ID(0), },
|
||||
{ USB_DEVICE(0x5c6, 0x904C),
|
||||
.driver_info = VALID_INTERFACE_NUM, },
|
||||
.driver_info = VALID_INTERFACE_NUM | DEV_ID(0), },
|
||||
{ USB_DEVICE(0x5c6, 0x9079),
|
||||
.driver_info = VALID_INTERFACE_NUM | DEV_ID(1), },
|
||||
|
||||
{} /* terminating entry */
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue