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 | 13 | */ |
e67d70f2 FB |
14 | |
15 | #ifndef __GADGET_CHIPS_H | |
16 | #define __GADGET_CHIPS_H | |
17 | ||
1da177e4 LT |
18 | #ifdef CONFIG_USB_GADGET_NET2280 |
19 | #define gadget_is_net2280(g) !strcmp("net2280", (g)->name) | |
20 | #else | |
21 | #define gadget_is_net2280(g) 0 | |
22 | #endif | |
23 | ||
55d402d8 TD |
24 | #ifdef CONFIG_USB_GADGET_AMD5536UDC |
25 | #define gadget_is_amd5536udc(g) !strcmp("amd5536udc", (g)->name) | |
26 | #else | |
27 | #define gadget_is_amd5536udc(g) 0 | |
28 | #endif | |
29 | ||
1da177e4 LT |
30 | #ifdef CONFIG_USB_GADGET_DUMMY_HCD |
31 | #define gadget_is_dummy(g) !strcmp("dummy_udc", (g)->name) | |
32 | #else | |
33 | #define gadget_is_dummy(g) 0 | |
34 | #endif | |
35 | ||
7a857620 PZ |
36 | #ifdef CONFIG_USB_GADGET_PXA25X |
37 | #define gadget_is_pxa(g) !strcmp("pxa25x_udc", (g)->name) | |
1da177e4 LT |
38 | #else |
39 | #define gadget_is_pxa(g) 0 | |
40 | #endif | |
41 | ||
42 | #ifdef CONFIG_USB_GADGET_GOKU | |
43 | #define gadget_is_goku(g) !strcmp("goku_udc", (g)->name) | |
44 | #else | |
45 | #define gadget_is_goku(g) 0 | |
46 | #endif | |
47 | ||
1da177e4 LT |
48 | #ifdef CONFIG_USB_GADGET_LH7A40X |
49 | #define gadget_is_lh7a40x(g) !strcmp("lh7a40x_udc", (g)->name) | |
50 | #else | |
51 | #define gadget_is_lh7a40x(g) 0 | |
52 | #endif | |
53 | ||
1da177e4 LT |
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 | ||
7f9985c2 | 60 | /* various unstable versions available */ |
1da177e4 LT |
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 | ||
55b3fd41 HS |
67 | #ifdef CONFIG_USB_GADGET_ATMEL_USBA |
68 | #define gadget_is_atmel_usba(g) !strcmp("atmel_usba_udc", (g)->name) | |