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.

There're several power scenarios depending on vendors.
It gives vendors flexibilty to meet their power requirement.
They can override suspend and resume of root hub.

Bug: 183761108
Change-Id: I51e4d190a6a110f987139d394621590fa40ea6a6
Signed-off-by: Daehwan Jung <dh10.jung@samsung.com>
Signed-off-by: JaeHun Jung <jh0801.jung@samsung.com>
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 Carlos Llamas
parent e3ff5d6bf0
commit cd3b5ff535
2 changed files with 9 additions and 0 deletions

View file

@ -5619,6 +5619,12 @@ void xhci_init_driver(struct hc_driver *drv,
drv->reset_bandwidth = over->reset_bandwidth;
if (over->update_hub_device)
drv->update_hub_device = over->update_hub_device;
if (over->address_device)
drv->address_device = over->address_device;
if (over->bus_suspend)
drv->bus_suspend = over->bus_suspend;
if (over->bus_resume)
drv->bus_resume = over->bus_resume;
}
}
EXPORT_SYMBOL_GPL(xhci_init_driver);

View file

@ -1963,6 +1963,9 @@ struct xhci_driver_overrides {
void (*reset_bandwidth)(struct usb_hcd *, struct usb_device *);
int (*update_hub_device)(struct usb_hcd *hcd, struct usb_device *hdev,
struct usb_tt *tt, gfp_t mem_flags);
int (*address_device)(struct usb_hcd *hcd, struct usb_device *udev);
int (*bus_suspend)(struct usb_hcd *hcd);
int (*bus_resume)(struct usb_hcd *hcd);
};
#define XHCI_CFC_DELAY 10