usb: gadget: introduce gadget_is_dwc3()
authorFelipe Balbi <balbi@ti.com>
Fri, 19 Aug 2011 15:10:57 +0000 (18:10 +0300)
committerGreg Kroah-Hartman <gregkh@suse.de>
Mon, 22 Aug 2011 23:00:46 +0000 (16:00 -0700)
... to check whether we're running on DesignWare
USB3 DRD Controller.

Signed-off-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/usb/gadget/gadget_chips.h

index f3a83cd0ef5043276a9986e2a9d77bdc4cff7dd7..a8855d0b7f3bdf19fbdc76eab8a25992f07884b0 100644 (file)
@@ -31,6 +31,7 @@
 #define gadget_is_ci13xxx_msm(g)       (!strcmp("ci13xxx_msm", (g)->name))
 #define gadget_is_ci13xxx_pci(g)       (!strcmp("ci13xxx_pci", (g)->name))
 #define gadget_is_dummy(g)             (!strcmp("dummy_udc", (g)->name))
+#define gadget_is_dwc3(g)              (!strcmp("dwc3-gadget", (g)->name))
 #define gadget_is_fsl_qe(g)            (!strcmp("fsl_qe_udc", (g)->name))
 #define gadget_is_fsl_usb2(g)          (!strcmp("fsl-usb2-udc", (g)->name))
 #define gadget_is_goku(g)              (!strcmp("goku_udc", (g)->name))
@@ -115,6 +116,8 @@ static inline int usb_gadget_controller_number(struct usb_gadget *gadget)
                return 0x30;
        else if (gadget_is_net2272(gadget))
                return 0x31;
+       else if (gadget_is_dwc3(gadget))
+               return 0x32;
 
        return -ENOENT;
 }