ANDROID: usb: host: add bus_suspend/bus_resume to 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
Signed-off-by: Daehwan Jung <dh10.jung@samsung.com>
Change-Id: Icf00d72d2657fe3433afa00541d25d1910e95954
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
This commit is contained in:
Daehwan Jung
2021-04-02 16:41:47 +09:00
committed by Greg Kroah-Hartman
parent 285973b22e
commit 5113fd3158
2 changed files with 6 additions and 0 deletions

View File

@@ -5404,6 +5404,10 @@ void xhci_init_driver(struct hc_driver *drv,
drv->reset_bandwidth = over->reset_bandwidth;
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

@@ -1949,6 +1949,8 @@ struct xhci_driver_overrides {
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);
int (*bus_suspend)(struct usb_hcd *hcd);
int (*bus_resume)(struct usb_hcd *hcd);
};
#define XHCI_CFC_DELAY 10