aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimon Shields <simon@lineageos.org>2018-09-12 00:34:08 +1000
committerDenis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>2020-03-28 01:15:43 +0100
commit07c7267d4b0892a8b50bfcf8646d8ec80322252f (patch)
tree5cae6614c37980352b35f9ecc2d6bccbffc8833a
parent823bed1459bad5ff141b5d7f31246cd5c79e8276 (diff)
downloadu-boot-midas-deblob-midas-2018.07.tar.gz
u-boot-midas-deblob-midas-2018.07.tar.bz2
u-boot-midas-deblob-midas-2018.07.zip
usb: gadget: add dwc2 support to gadget_chipsdeblob-midas-2018.07
-rw-r--r--drivers/usb/gadget/gadget_chips.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/usb/gadget/gadget_chips.h b/drivers/usb/gadget/gadget_chips.h
index f320708431..c8c33da72e 100644
--- a/drivers/usb/gadget/gadget_chips.h
+++ b/drivers/usb/gadget/gadget_chips.h
@@ -149,6 +149,11 @@
#define gadget_is_dwc3(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
/*
@@ -214,5 +219,7 @@ 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_dwc2(gadget))
+ return 0x23;
return -ENOENT;
}