USB: EHCI: prepare to make ehci-hcd a library module
This patch (as1624) prepares ehci-hcd for being split up into a core library and separate platform driver modules. A generic ehci_hc_driver structure is created, containing all the "standard" values, and a new mechanism is added whereby a driver module can specify a set of overrides to those values. In addition the ehci_setup(), ehci_suspend(), and ehci_resume() routines need to be EXPORTed for use by the drivers. As a side effect of this change, a few routines no longer need to be marked __maybe_unused. Signed-off-by: Alan Stern <stern@rowland.harvard.edu> CC: Felipe Balbi <balbi@ti.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:

committed by
Greg Kroah-Hartman

parent
7c83b44836
commit
3e02320399
@@ -781,4 +781,21 @@ static inline u32 hc32_to_cpup (const struct ehci_hcd *ehci, const __hc32 *x)
|
||||
|
||||
/*-------------------------------------------------------------------------*/
|
||||
|
||||
/* Declarations of things exported for use by ehci platform drivers */
|
||||
|
||||
struct ehci_driver_overrides {
|
||||
const char *product_desc;
|
||||
size_t extra_priv_size;
|
||||
int (*reset)(struct usb_hcd *hcd);
|
||||
};
|
||||
|
||||
extern void ehci_init_driver(struct hc_driver *drv,
|
||||
const struct ehci_driver_overrides *over);
|
||||
extern int ehci_setup(struct usb_hcd *hcd);
|
||||
|
||||
#ifdef CONFIG_PM
|
||||
extern int ehci_suspend(struct usb_hcd *hcd, bool do_wakeup);
|
||||
extern int ehci_resume(struct usb_hcd *hcd, bool hibernated);
|
||||
#endif /* CONFIG_PM */
|
||||
|
||||
#endif /* __LINUX_EHCI_HCD_H */
|
||||
|
Reference in New Issue
Block a user