Skip to content

Commit 592338d

Browse files
Jim Lingregkh
authored andcommitted
xhci: Add hub_control to xhci_driver_overrides
Add a hub_control() callback to the xhci_driver_overrides structure to allow host drivers to override the default hub_control function. This is required for Tegra which requires device specific actions for power management to be executed during USB state transitions. Signed-off-by: Jim Lin <[email protected]> Reviewed-by: Jon Hunter <[email protected]> Tested-by: Jon Hunter <[email protected]> Acked-by: Thierry Reding <[email protected]> Acked-by: Mathias Nyman <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent ee0e40e commit 592338d

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

drivers/usb/host/xhci.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5502,6 +5502,8 @@ void xhci_init_driver(struct hc_driver *drv,
55025502
drv->check_bandwidth = over->check_bandwidth;
55035503
if (over->reset_bandwidth)
55045504
drv->reset_bandwidth = over->reset_bandwidth;
5505+
if (over->hub_control)
5506+
drv->hub_control = over->hub_control;
55055507
}
55065508
}
55075509
EXPORT_SYMBOL_GPL(xhci_init_driver);

drivers/usb/host/xhci.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1943,6 +1943,8 @@ struct xhci_driver_overrides {
19431943
struct usb_host_endpoint *ep);
19441944
int (*check_bandwidth)(struct usb_hcd *, struct usb_device *);
19451945
void (*reset_bandwidth)(struct usb_hcd *, struct usb_device *);
1946+
int (*hub_control)(struct usb_hcd *hcd, u16 typeReq, u16 wValue,
1947+
u16 wIndex, char *buf, u16 wLength);
19461948
};
19471949

19481950
#define XHCI_CFC_DELAY 10

0 commit comments

Comments
 (0)