From 3e57f7792670d84feca1653ed4fd86299ef18f32 Mon Sep 17 00:00:00 2001 From: Anurag Kumar Vulisha Date: Sat, 30 Mar 2019 10:23:19 +0000 Subject: [PATCH] usb: dwc3: otg: Update Kconfig and Makefile for enabling OTG This patch updates the Kconfig and Makefile for enabling the OTG driver. Signed-off-by: Anurag Kumar Vulisha Signed-off-by: Michal Simek --- drivers/usb/dwc3/Kconfig | 8 ++++++++ drivers/usb/dwc3/Makefile | 6 +++++- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/drivers/usb/dwc3/Kconfig b/drivers/usb/dwc3/Kconfig index 518ead12458d..da71c9c444a7 100644 --- a/drivers/usb/dwc3/Kconfig +++ b/drivers/usb/dwc3/Kconfig @@ -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" diff --git a/drivers/usb/dwc3/Makefile b/drivers/usb/dwc3/Makefile index 29ffe855baf3..71673dab5cd0 100644 --- a/drivers/usb/dwc3/Makefile +++ b/drivers/usb/dwc3/Makefile @@ -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 -- 2.39.2