Skip to content

Commit 500fdf8

Browse files
Felipe Balbigregkh
authored andcommitted
usb: gadget: introduce gadget_is_dwc3()
... to check whether we're running on DesignWare USB3 DRD Controller. Signed-off-by: Felipe Balbi <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent da6819d commit 500fdf8

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

drivers/usb/gadget/gadget_chips.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
#define gadget_is_ci13xxx_msm(g) (!strcmp("ci13xxx_msm", (g)->name))
3232
#define gadget_is_ci13xxx_pci(g) (!strcmp("ci13xxx_pci", (g)->name))
3333
#define gadget_is_dummy(g) (!strcmp("dummy_udc", (g)->name))
34+
#define gadget_is_dwc3(g) (!strcmp("dwc3-gadget", (g)->name))
3435
#define gadget_is_fsl_qe(g) (!strcmp("fsl_qe_udc", (g)->name))
3536
#define gadget_is_fsl_usb2(g) (!strcmp("fsl-usb2-udc", (g)->name))
3637
#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)
115116
return 0x30;
116117
else if (gadget_is_net2272(gadget))
117118
return 0x31;
119+
else if (gadget_is_dwc3(gadget))
120+
return 0x32;
118121

119122
return -ENOENT;
120123
}

0 commit comments

Comments
 (0)