]>
Commit | Line | Data |
---|---|---|
1da177e4 LT |
1 | /* |
2 | * USB device controllers have lots of quirks. Use these macros in | |
3 | * gadget drivers or other code that needs to deal with them, and which | |
4 | * autoconfigures instead of using early binding to the hardware. | |
5 | * | |
1c05ad44 | 6 | * This SHOULD eventually work like the ARM mach_is_*() stuff, driven by |
1da177e4 | 7 | * some config file that gets updated as new hardware is supported. |
1c05ad44 | 8 | * (And avoiding all runtime comparisons in typical one-choice configs!) |
1da177e4 LT |
9 | * |
10 | * NOTE: some of these controller drivers may not be available yet. | |
7f9985c2 DB |
11 | * Some are available on 2.4 kernels; several are available, but not |
12 | * yet pushed in the 2.6 mainline tree. | |
1da177e4 LT |
13 | */ |
14 | #ifdef CONFIG_USB_GADGET_NET2280 | |
15 | #define gadget_is_net2280(g) !strcmp("net2280", (g)->name) | |
16 | #else | |
17 | #define gadget_is_net2280(g) 0 | |
18 | #endif | |
19 | ||
55d402d8 TD |
20 | #ifdef CONFIG_USB_GADGET_AMD5536UDC |
21 | #define gadget_is_amd5536udc(g) !strcmp("amd5536udc", (g)->name) | |
22 | #else | |
23 | #define gadget_is_amd5536udc(g) 0 | |
24 | #endif | |
25 | ||
1da177e4 LT |
26 | #ifdef CONFIG_USB_GADGET_DUMMY_HCD |
27 | #define gadget_is_dummy(g) !strcmp("dummy_udc", (g)->name) | |
28 | #else | |
29 | #define gadget_is_dummy(g) 0 | |
30 | #endif | |
31 | ||
7a857620 PZ |
32 | #ifdef CONFIG_USB_GADGET_PXA25X |
33 | #define gadget_is_pxa(g) !strcmp("pxa25x_udc", (g)->name) | |
1da177e4 LT |
34 | #else |
35 | #define gadget_is_pxa(g) 0 | |
36 | #endif | |
37 | ||
38 | #ifdef CONFIG_USB_GADGET_GOKU | |
39 | #define gadget_is_goku(g) !strcmp("goku_udc", (g)->name) | |
40 | #else | |
41 | #define gadget_is_goku(g) 0 | |
42 | #endif | |
43 | ||
7f9985c2 | 44 | /* SH3 UDC -- not yet ported 2.4 --> 2.6 */ |
1da177e4 LT |
45 | #ifdef CONFIG_USB_GADGET_SUPERH |
46 | #define gadget_is_sh(g) !strcmp("sh_udc", (g)->name) | |
47 | #else | |
48 | #define gadget_is_sh(g) 0 | |
49 | #endif | |
50 | ||
7f9985c2 | 51 | /* not yet stable on 2.6 (would help "original Zaurus") */ |
1da177e4 LT |
52 | #ifdef CONFIG_USB_GADGET_SA1100 |
53 | #define gadget_is_sa1100(g) !strcmp("sa1100_udc", (g)->name) | |
54 | #else | |
55 | #define gadget_is_sa1100(g) 0 | |
56 | #endif | |
57 | ||
58 | #ifdef CONFIG_USB_GADGET_LH7A40X | |
59 | #define gadget_is_lh7a40x(g) !strcmp("lh7a40x_udc", (g)->name) | |
60 | #else | |
61 | #define gadget_is_lh7a40x(g) 0 | |
62 | #endif | |
63 | ||
7f9985c2 | 64 | /* handhelds.org tree (?) */ |
1da177e4 LT |
65 | #ifdef CONFIG_USB_GADGET_MQ11XX |
66 | #define gadget_is_mq11xx(g) !strcmp("mq11xx_udc", (g)->name) | |
67 | #else | |
68 | #define gadget_is_mq11xx(g) 0 | |
69 | #endif | |
70 | ||
71 | #ifdef CONFIG_USB_GADGET_OMAP | |
72 | #define gadget_is_omap(g) !strcmp("omap_udc", (g)->name) | |
73 | #else | |
74 | #define gadget_is_omap(g) 0 | |
75 | #endif | |
76 | ||
7f9985c2 | 77 | /* not yet ported 2.4 --> 2.6 */ |
1da177e4 LT |
78 | #ifdef CONFIG_USB_GADGET_N9604 |
79 | #define gadget_is_n9604(g) !strcmp("n9604_udc", (g)->name) | |
80 | #else | |
81 | #define gadget_is_n9604(g) 0 | |
82 | #endif | |
83 | ||
7f9985c2 | 84 | /* various unstable versions available */ |
1da177e4 LT |
85 | #ifdef CONFIG_USB_GADGET_PXA27X |
86 | #define gadget_is_pxa27x(g) !strcmp("pxa27x_udc", (g)->name) | |
87 | #else | |
88 | #define gadget_is_pxa27x(g) 0 | |
89 | #endif | |
90 | ||
55b3fd41 HS |
91 | #ifdef CONFIG_USB_GADGET_ATMEL_USBA |
92 | #define gadget_is_atmel_usba(g) !strcmp("atmel_usba_udc", (g)->name) | |