diff options
-rw-r--r-- | drivers/usb/gadget/gadget_chips.h | 182 |
1 files changed, 33 insertions, 149 deletions
diff --git a/drivers/usb/gadget/gadget_chips.h b/drivers/usb/gadget/gadget_chips.h index 13c2f9e94405..f3a83cd0ef50 100644 --- a/drivers/usb/gadget/gadget_chips.h +++ b/drivers/usb/gadget/gadget_chips.h | |||
@@ -15,156 +15,40 @@ | |||
15 | #ifndef __GADGET_CHIPS_H | 15 | #ifndef __GADGET_CHIPS_H |
16 | #define __GADGET_CHIPS_H | 16 | #define __GADGET_CHIPS_H |
17 | 17 | ||
18 | #ifdef CONFIG_USB_GADGET_NET2272 | 18 | /* |
19 | #define gadget_is_net2272(g) !strcmp("net2272", (g)->name) | 19 | * NOTICE: the entries below are alphabetical and should be kept |
20 | #else | 20 | * that way. |
21 | #define gadget_is_net2272(g) 0 | 21 | * |
22 | #endif | 22 | * Always be sure to add new entries to the correct position or |
23 | 23 | * accept the bashing later. | |
24 | #ifdef CONFIG_USB_GADGET_NET2280 | 24 | * |
25 | #define gadget_is_net2280(g) !strcmp("net2280", (g)->name) | 25 | * If you have forgotten the alphabetical order let VIM/EMACS |
26 | #else | 26 | * do that for you. |
27 | #define gadget_is_net2280(g) 0 | 27 | */ |
28 | #endif | 28 | #define gadget_is_amd5536udc(g) (!strcmp("amd5536udc", (g)->name)) |
29 | 29 | #define gadget_is_at91(g) (!strcmp("at91_udc", (g)->name)) | |
30 | #ifdef CONFIG_USB_GADGET_AMD5536UDC | 30 | #define gadget_is_atmel_usba(g) (!strcmp("atmel_usba_udc", (g)->name)) |
31 | #define gadget_is_amd5536udc(g) !strcmp("amd5536udc", (g)->name) | ||
32 | #else | ||
33 | #define gadget_is_amd5536udc(g) 0 | ||
34 | #endif | ||
35 | |||
36 | #ifdef CONFIG_USB_GADGET_DUMMY_HCD | ||
37 | #define gadget_is_dummy(g) !strcmp("dummy_udc", (g)->name) | ||
38 | #else | ||
39 | #define gadget_is_dummy(g) 0 | ||
40 | #endif | ||
41 | |||
42 | #ifdef CONFIG_USB_GADGET_PXA25X | ||
43 | #define gadget_is_pxa(g) !strcmp("pxa25x_udc", (g)->name) | ||
44 | #else | ||
45 | #define gadget_is_pxa(g) 0 | ||
46 | #endif | ||
47 | |||
48 | #ifdef CONFIG_USB_GADGET_GOKU | ||
49 | #define gadget_is_goku(g) !strcmp("goku_udc", (g)->name) | ||
50 | #else | ||
51 | #define gadget_is_goku(g) 0 | ||
52 | #endif | ||
53 | |||
54 | #ifdef CONFIG_USB_GADGET_OMAP | ||
55 | #define gadget_is_omap(g) !strcmp("omap_udc", (g)->name) | ||
56 | #else | ||
57 | #define gadget_is_omap(g) 0 | ||
58 | #endif | ||
59 | |||
60 | /* various unstable versions available */ | ||
61 | #ifdef CONFIG_USB_GADGET_PXA27X | ||
62 | #define gadget_is_pxa27x(g) !strcmp("pxa27x_udc", (g)->name) | ||
63 | #else | ||
64 | #define gadget_is_pxa27x(g) 0 | ||
65 | #endif | ||
66 | |||
67 | #ifdef CONFIG_USB_GADGET_ATMEL_USBA | ||
68 | #define gadget_is_atmel_usba(g) !strcmp("atmel_usba_udc", (g)->name) | ||
69 | #else | ||
70 | #define gadget_is_atmel_usba(g) 0 | ||
71 | #endif | ||
72 | |||
73 | #ifdef CONFIG_USB_GADGET_S3C2410 | ||
74 | #define gadget_is_s3c2410(g) !strcmp("s3c2410_udc", (g)->name) | ||
75 | #else | ||
76 | #define gadget_is_s3c2410(g) 0 | ||
77 | #endif | ||
78 | |||
79 | #ifdef CONFIG_USB_GADGET_AT91 | ||
80 | #define gadget_is_at91(g) !strcmp("at91_udc", (g)->name) | ||
81 | #else | ||
82 | #define gadget_is_at91(g) 0 | ||
83 | #endif | ||
84 | |||
85 | #ifdef CONFIG_USB_GADGET_IMX | ||
86 | #define gadget_is_imx(g) !strcmp("imx_udc", (g)->name) | ||
87 | #else | ||
88 | #define gadget_is_imx(g) 0 | ||
89 | #endif | ||
90 | |||
91 | #ifdef CONFIG_USB_GADGET_FSL_USB2 | ||
92 | #define gadget_is_fsl_usb2(g) !strcmp("fsl-usb2-udc", (g)->name) | ||
93 | #else | ||
94 | #define gadget_is_fsl_usb2(g) 0 | ||
95 | #endif | ||
96 | |||
97 | /* Mentor high speed "dual role" controller, in peripheral role */ | ||
98 | #ifdef CONFIG_USB_GADGET_MUSB_HDRC | ||
99 | #define gadget_is_musbhdrc(g) !strcmp("musb-hdrc", (g)->name) | ||
100 | #else | ||
101 | #define gadget_is_musbhdrc(g) 0 | ||
102 | #endif | ||
103 | |||
104 | #ifdef CONFIG_USB_GADGET_LANGWELL | ||
105 | #define gadget_is_langwell(g) (!strcmp("langwell_udc", (g)->name)) | ||
106 | #else | ||
107 | #define gadget_is_langwell(g) 0 | ||
108 | #endif | ||
109 | |||
110 | #ifdef CONFIG_USB_GADGET_M66592 | ||
111 | #define gadget_is_m66592(g) !strcmp("m66592_udc", (g)->name) | ||
112 | #else | ||
113 | #define gadget_is_m66592(g) 0 | ||
114 | #endif | ||
115 | |||
116 | /* Freescale CPM/QE UDC SUPPORT */ | ||
117 | #ifdef CONFIG_USB_GADGET_FSL_QE | ||
118 | #define gadget_is_fsl_qe(g) !strcmp("fsl_qe_udc", (g)->name) | ||
119 | #else | ||
120 | #define gadget_is_fsl_qe(g) 0 | ||
121 | #endif | ||
122 | |||
123 | #ifdef CONFIG_USB_GADGET_CI13XXX_PCI | ||
124 | #define gadget_is_ci13xxx_pci(g) (!strcmp("ci13xxx_pci", (g)->name)) | ||
125 | #else | ||
126 | #define gadget_is_ci13xxx_pci(g) 0 | ||
127 | #endif | ||
128 | |||
129 | // CONFIG_USB_GADGET_SX2 | ||
130 | // CONFIG_USB_GADGET_AU1X00 | ||
131 | // ... | ||
132 | |||
133 | #ifdef CONFIG_USB_GADGET_R8A66597 | ||
134 | #define gadget_is_r8a66597(g) !strcmp("r8a66597_udc", (g)->name) | ||
135 | #else | ||
136 | #define gadget_is_r8a66597(g) 0 | ||
137 | #endif | ||
138 | |||
139 | #ifdef CONFIG_USB_S3C_HSOTG | ||
140 | #define gadget_is_s3c_hsotg(g) (!strcmp("s3c-hsotg", (g)->name)) | ||
141 | #else | ||
142 | #define gadget_is_s3c_hsotg(g) 0 | ||
143 | #endif | ||
144 | |||
145 | #ifdef CONFIG_USB_S3C_HSUDC | ||
146 | #define gadget_is_s3c_hsudc(g) (!strcmp("s3c-hsudc", (g)->name)) | ||
147 | #else | ||
148 | #define gadget_is_s3c_hsudc(g) 0 | ||
149 | #endif | ||
150 | |||
151 | #ifdef CONFIG_USB_GADGET_EG20T | ||
152 | #define gadget_is_pch(g) (!strcmp("pch_udc", (g)->name)) | ||
153 | #else | ||
154 | #define gadget_is_pch(g) 0 | ||
155 | #endif | ||
156 | |||
157 | #ifdef CONFIG_USB_GADGET_CI13XXX_MSM | ||
158 | #define gadget_is_ci13xxx_msm(g) (!strcmp("ci13xxx_msm", (g)->name)) | 31 | #define gadget_is_ci13xxx_msm(g) (!strcmp("ci13xxx_msm", (g)->name)) |
159 | #else | 32 | #define gadget_is_ci13xxx_pci(g) (!strcmp("ci13xxx_pci", (g)->name)) |
160 | #define gadget_is_ci13xxx_msm(g) 0 | 33 | #define gadget_is_dummy(g) (!strcmp("dummy_udc", (g)->name)) |
161 | #endif | 34 | #define gadget_is_fsl_qe(g) (!strcmp("fsl_qe_udc", (g)->name)) |
162 | 35 | #define gadget_is_fsl_usb2(g) (!strcmp("fsl-usb2-udc", (g)->name)) | |
163 | #ifdef CONFIG_USB_GADGET_RENESAS_USBHS | 36 | #define gadget_is_goku(g) (!strcmp("goku_udc", (g)->name)) |
164 | #define gadget_is_renesas_usbhs(g) (!strcmp("renesas_usbhs_udc", (g)->name)) | 37 | #define gadget_is_imx(g) (!strcmp("imx_udc", (g)->name)) |
165 | #else | 38 | #define gadget_is_langwell(g) (!strcmp("langwell_udc", (g)->name)) |
166 | #define gadget_is_renesas_usbhs(g) 0 | 39 | #define gadget_is_m66592(g) (!strcmp("m66592_udc", (g)->name)) |
167 | #endif | 40 | #define gadget_is_musbhdrc(g) (!strcmp("musb-hdrc", (g)->name)) |
41 | #define gadget_is_net2272(g) (!strcmp("net2272", (g)->name)) | ||
42 | #define gadget_is_net2280(g) (!strcmp("net2280", (g)->name)) | ||
43 | #define gadget_is_omap(g) (!strcmp("omap_udc", (g)->name)) | ||
44 | #define gadget_is_pch(g) (!strcmp("pch_udc", (g)->name)) | ||
45 | #define gadget_is_pxa(g) (!strcmp("pxa25x_udc", (g)->name)) | ||
46 | #define gadget_is_pxa27x(g) (!strcmp("pxa27x_udc", (g)->name)) | ||
47 | #define gadget_is_r8a66597(g) (!strcmp("r8a66597_udc", (g)->name)) | ||
48 | #define gadget_is_renesas_usbhs(g) (!strcmp("renesas_usbhs_udc", (g)->name)) | ||
49 | #define gadget_is_s3c2410(g) (!strcmp("s3c2410_udc", (g)->name)) | ||
50 | #define gadget_is_s3c_hsotg(g) (!strcmp("s3c-hsotg", (g)->name)) | ||
51 | #define gadget_is_s3c_hsudc(g) (!strcmp("s3c-hsudc", (g)->name)) | ||
168 | 52 | ||
169 | /** | 53 | /** |
170 | * usb_gadget_controller_number - support bcdDevice id convention | 54 | * usb_gadget_controller_number - support bcdDevice id convention |