]> rtime.felk.cvut.cz Git - zynq/linux.git/commitdiff
usb: dwc3: otg: Update Kconfig and Makefile for enabling OTG
authorAnurag Kumar Vulisha <anurag.kumar.vulisha@xilinx.com>
Sat, 30 Mar 2019 10:23:19 +0000 (10:23 +0000)
committerMichal Simek <michal.simek@xilinx.com>
Wed, 3 Apr 2019 08:31:24 +0000 (10:31 +0200)
This patch updates the Kconfig and Makefile for enabling
the OTG driver.

Signed-off-by: Anurag Kumar Vulisha <anurag.kumar.vulisha@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
drivers/usb/dwc3/Kconfig
drivers/usb/dwc3/Makefile

index 518ead12458d068d24607e0529d16d40f100640c..da71c9c444a7eae8ce5c601040229dd5afd035e2 100644 (file)
@@ -21,6 +21,7 @@ config USB_DWC3_ULPI
 choice
        bool "DWC3 Mode Selection"
        default USB_DWC3_DUAL_ROLE if (USB && USB_GADGET)
+       default USB_DWC3_OTG if (USB && USB_GADGET && USB_OTG && USB_OTG_FSM)
        default USB_DWC3_HOST if (USB && !USB_GADGET)
        default USB_DWC3_GADGET if (!USB && USB_GADGET)
 
@@ -46,6 +47,13 @@ config USB_DWC3_DUAL_ROLE
          This is the default mode of working of DWC3 controller where
          both host and gadget features are enabled.
 
+config USB_DWC3_OTG
+       bool "Dual Role mode + OTG"
+       depends on ((USB=y || USB=USB_DWC3) && (USB_GADGET=y || USB_GADGET=USB_DWC3) && USB_OTG && USB_OTG_FSM && PM)
+       help
+         This is the default mode of working of DWC3 controller where
+         both host and gadget features are enabled with OTG support.
+
 endchoice
 
 comment "Platform Glue Driver Support"
index 29ffe855baf3d7905a3c32dad6759b8e49b440af..71673dab5cd0615075113010587bab4a6e44813e 100644 (file)
@@ -10,7 +10,7 @@ ifneq ($(CONFIG_TRACING),)
        dwc3-y                          += trace.o
 endif
 
-ifneq ($(filter y,$(CONFIG_USB_DWC3_HOST) $(CONFIG_USB_DWC3_DUAL_ROLE)),)
+ifneq ($(filter y,$(CONFIG_USB_DWC3_HOST) $(CONFIG_USB_DWC3_DUAL_ROLE) $(CONFIG_USB_DWC3_OTG)),)
        dwc3-y                          += host.o
 endif
 
@@ -18,6 +18,10 @@ ifneq ($(filter y,$(CONFIG_USB_DWC3_GADGET) $(CONFIG_USB_DWC3_DUAL_ROLE) $(CONFI
        dwc3-y                          += gadget.o ep0.o gadget_hibernation.o
 endif
 
+ifneq ($(CONFIG_USB_DWC3_OTG),)
+       dwc3-y                          += otg.o
+endif
+
 ifneq ($(CONFIG_USB_DWC3_DUAL_ROLE),)
        dwc3-y                          += drd.o
 endif