Commit 500fdf8b authored by Felipe Balbi's avatar Felipe Balbi Committed by Greg Kroah-Hartman

usb: gadget: introduce gadget_is_dwc3()

... to check whether we're running on DesignWare
USB3 DRD Controller.
Signed-off-by: default avatarFelipe Balbi <balbi@ti.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent da6819db
...@@ -31,6 +31,7 @@ ...@@ -31,6 +31,7 @@
#define gadget_is_ci13xxx_msm(g) (!strcmp("ci13xxx_msm", (g)->name)) #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_ci13xxx_pci(g) (!strcmp("ci13xxx_pci", (g)->name))
#define gadget_is_dummy(g) (!strcmp("dummy_udc", (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_qe(g) (!strcmp("fsl_qe_udc", (g)->name))
#define gadget_is_fsl_usb2(g) (!strcmp("fsl-usb2-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)) #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) ...@@ -115,6 +116,8 @@ static inline int usb_gadget_controller_number(struct usb_gadget *gadget)
return 0x30; return 0x30;
else if (gadget_is_net2272(gadget)) else if (gadget_is_net2272(gadget))
return 0x31; return 0x31;
else if (gadget_is_dwc3(gadget))
return 0x32;
return -ENOENT; return -ENOENT;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment