ANDROID: usb: host: add address_device to xhci overrides

Co-processor needs some information about connected usb device.
It's proper to pass information after usb device gets address when
getting "Set Address" command.
It supports vendors to implement it using xhci overrides.

Bug: 183761108
Signed-off-by: Daehwan Jung <dh10.jung@samsung.com>
Change-Id: If3292ab7d354f8dcd8a43dd3c1bec823588bfc12
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
This commit is contained in:
Daehwan Jung 2021-04-01 15:13:56 +09:00 committed by Greg Kroah-Hartman
parent 2e4b322b06
commit 285973b22e
2 changed files with 3 additions and 0 deletions

View File

@ -5402,6 +5402,8 @@ void xhci_init_driver(struct hc_driver *drv,
drv->check_bandwidth = over->check_bandwidth;
if (over->reset_bandwidth)
drv->reset_bandwidth = over->reset_bandwidth;
if (over->address_device)
drv->address_device = over->address_device;
}
}
EXPORT_SYMBOL_GPL(xhci_init_driver);

View File

@ -1948,6 +1948,7 @@ struct xhci_driver_overrides {
struct usb_host_endpoint *ep);
int (*check_bandwidth)(struct usb_hcd *, struct usb_device *);
void (*reset_bandwidth)(struct usb_hcd *, struct usb_device *);
int (*address_device)(struct usb_hcd *hcd, struct usb_device *udev);
};
#define XHCI_CFC_DELAY 10