]> Git Repo - J-u-boot.git/blobdiff - drivers/usb/gadget/gadget_chips.h
usb: gadget: Add bcdDevice for the DWC2 USB Gadget Controller
[J-u-boot.git] / drivers / usb / gadget / gadget_chips.h
index f3207084314991e52cd4947b8c785abefbe2c8cb..06e6a4894954e463d1a788ef94479d61a9bafd22 100644 (file)
 #define gadget_is_dwc3(g)        0
 #endif
 
+#ifdef CONFIG_USB_CDNS3_GADGET
+#define gadget_is_cdns3(g)        (!strcmp("cdns3-gadget", (g)->name))
+#else
+#define gadget_is_cdns3(g)        0
+#endif
 
+#ifdef CONFIG_USB_GADGET_MAX3420
+#define gadget_is_max3420(g)        (!strcmp("max3420-udc", (g)->name))
+#else
+#define gadget_is_max3420(g)        0
+#endif
 
-/*
- * CONFIG_USB_GADGET_SX2
- * CONFIG_USB_GADGET_AU1X00
- * ...
- */
+#ifdef CONFIG_USB_MTU3_GADGET
+#define gadget_is_mtu3(g)        (!strcmp("mtu3-gadget", (g)->name))
+#else
+#define gadget_is_mtu3(g)        0
+#endif
+
+#ifdef CONFIG_USB_GADGET_DWC2_OTG
+#define gadget_is_dwc2(g)        (!strcmp("dwc2-udc", (g)->name))
+#else
+#define gadget_is_dwc2(g)        0
+#endif
 
 /**
  * usb_gadget_controller_number - support bcdDevice id convention
@@ -214,5 +230,15 @@ static inline int usb_gadget_controller_number(struct usb_gadget *gadget)
                return 0x21;
        else if (gadget_is_fotg210(gadget))
                return 0x22;
+       else if (gadget_is_dwc3(gadget))
+               return 0x23;
+       else if (gadget_is_cdns3(gadget))
+               return 0x24;
+       else if (gadget_is_max3420(gadget))
+               return 0x25;
+       else if (gadget_is_mtu3(gadget))
+               return 0x26;
+       else if (gadget_is_dwc2(gadget))
+               return 0x27;
        return -ENOENT;
 }
This page took 0.026573 seconds and 4 git commands to generate.