gadget_chips.h 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  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. *
  6. * This could eventually work like the ARM mach_is_*() stuff, driven by
  7. * some config file that gets updated as new hardware is supported.
  8. *
  9. * NOTE: some of these controller drivers may not be available yet.
  10. */
  11. #ifdef CONFIG_USB_GADGET_NET2280
  12. #define gadget_is_net2280(g) !strcmp("net2280", (g)->name)
  13. #else
  14. #define gadget_is_net2280(g) 0
  15. #endif
  16. #ifdef CONFIG_USB_GADGET_DUMMY_HCD
  17. #define gadget_is_dummy(g) !strcmp("dummy_udc", (g)->name)
  18. #else
  19. #define gadget_is_dummy(g) 0
  20. #endif
  21. #ifdef CONFIG_USB_GADGET_PXA2XX
  22. #define gadget_is_pxa(g) !strcmp("pxa2xx_udc", (g)->name)
  23. #else
  24. #define gadget_is_pxa(g) 0
  25. #endif
  26. #ifdef CONFIG_USB_GADGET_GOKU
  27. #define gadget_is_goku(g) !strcmp("goku_udc", (g)->name)
  28. #else
  29. #define gadget_is_goku(g) 0
  30. #endif
  31. #ifdef CONFIG_USB_GADGET_SUPERH
  32. #define gadget_is_sh(g) !strcmp("sh_udc", (g)->name)
  33. #else
  34. #define gadget_is_sh(g) 0
  35. #endif
  36. #ifdef CONFIG_USB_GADGET_SA1100
  37. #define gadget_is_sa1100(g) !strcmp("sa1100_udc", (g)->name)
  38. #else
  39. #define gadget_is_sa1100(g) 0
  40. #endif
  41. #ifdef CONFIG_USB_GADGET_LH7A40X
  42. #define gadget_is_lh7a40x(g) !strcmp("lh7a40x_udc", (g)->name)
  43. #else
  44. #define gadget_is_lh7a40x(g) 0
  45. #endif
  46. #ifdef CONFIG_USB_GADGET_MQ11XX
  47. #define gadget_is_mq11xx(g) !strcmp("mq11xx_udc", (g)->name)
  48. #else
  49. #define gadget_is_mq11xx(g) 0
  50. #endif
  51. #ifdef CONFIG_USB_GADGET_OMAP
  52. #define gadget_is_omap(g) !strcmp("omap_udc", (g)->name)
  53. #else
  54. #define gadget_is_omap(g) 0
  55. #endif
  56. #ifdef CONFIG_USB_GADGET_N9604
  57. #define gadget_is_n9604(g) !strcmp("n9604_udc", (g)->name)
  58. #else
  59. #define gadget_is_n9604(g) 0
  60. #endif
  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. #ifdef CONFIG_USB_GADGET_S3C2410
  67. #define gadget_is_s3c2410(g) !strcmp("s3c2410_udc", (g)->name)
  68. #else
  69. #define gadget_is_s3c2410(g) 0
  70. #endif
  71. #ifdef CONFIG_USB_GADGET_AT91
  72. #define gadget_is_at91(g) !strcmp("at91_udc", (g)->name)
  73. #else
  74. #define gadget_is_at91(g) 0
  75. #endif
  76. // CONFIG_USB_GADGET_SX2
  77. // CONFIG_USB_GADGET_AU1X00
  78. // ...