xref: /linux/drivers/usb/host/xhci-plat.h (revision 8a7c601e14576a22c2bbf7f67455ccf3f3d2737f)
1 /* SPDX-License-Identifier: GPL-2.0 */
2 /*
3  * xhci-plat.h - xHCI host controller driver platform Bus Glue.
4  *
5  * Copyright (C) 2015 Renesas Electronics Corporation
6  */
7 
8 #ifndef _XHCI_PLAT_H
9 #define _XHCI_PLAT_H
10 
11 struct device;
12 struct platform_device;
13 struct usb_hcd;
14 
15 struct xhci_plat_priv {
16 	const char *firmware_name;
17 	unsigned long long quirks;
18 	bool power_lost;
19 	unsigned sideband_at_suspend:1;
20 	void (*plat_start)(struct usb_hcd *);
21 	int (*init_quirk)(struct usb_hcd *);
22 	int (*suspend_quirk)(struct usb_hcd *);
23 	int (*resume_quirk)(struct usb_hcd *);
24 	int (*post_resume_quirk)(struct usb_hcd *);
25 };
26 
27 #define hcd_to_xhci_priv(h) ((struct xhci_plat_priv *)hcd_to_xhci(h)->priv)
28 #define xhci_to_priv(x) ((struct xhci_plat_priv *)(x)->priv)
29 
30 int xhci_plat_probe(struct platform_device *pdev, struct device *sysdev,
31 		    const struct xhci_plat_priv *priv_match);
32 
33 void xhci_plat_remove(struct platform_device *dev);
34 extern const struct dev_pm_ops xhci_plat_pm_ops;
35 
36 #endif	/* _XHCI_PLAT_H */
37