1/* SPDX-License-Identifier: GPL-2.0 */
2#ifndef __FOTG210_H
3#define __FOTG210_H
4
5enum gemini_port {
6 GEMINI_PORT_NONE = 0,
7 GEMINI_PORT_0,
8 GEMINI_PORT_1,
9};
10
11struct fotg210 {
12 struct device *dev;
13 struct resource *res;
14 void __iomem *base;
15 struct clk *pclk;
16 struct regmap *map;
17 enum gemini_port port;
18};
19
20void fotg210_vbus(struct fotg210 *fotg, bool enable);
21
22#ifdef CONFIG_USB_FOTG210_HCD
23int fotg210_hcd_probe(struct platform_device *pdev, struct fotg210 *fotg);
24int fotg210_hcd_remove(struct platform_device *pdev);
25int fotg210_hcd_init(void);
26void fotg210_hcd_cleanup(void);
27#else
28static inline int fotg210_hcd_probe(struct platform_device *pdev,
29 struct fotg210 *fotg)
30{
31 return 0;
32}
33static inline int fotg210_hcd_remove(struct platform_device *pdev)
34{
35 return 0;
36}
37static inline int fotg210_hcd_init(void)
38{
39 return 0;
40}
41static inline void fotg210_hcd_cleanup(void)
42{
43}
44#endif
45
46#ifdef CONFIG_USB_FOTG210_UDC
47int fotg210_udc_probe(struct platform_device *pdev, struct fotg210 *fotg);
48int fotg210_udc_remove(struct platform_device *pdev);
49#else
50static inline int fotg210_udc_probe(struct platform_device *pdev,
51 struct fotg210 *fotg)
52{
53 return 0;
54}
55static inline int fotg210_udc_remove(struct platform_device *pdev)
56{
57 return 0;
58}
59#endif
60
61#endif /* __FOTG210_H */
62

source code of linux/drivers/usb/fotg210/fotg210.h