mirror of
git://git.openwrt.org/openwrt/openwrt.git
synced 2025-12-16 09:32:09 -05:00
kernel: usb: kmod-usb-dwc3: add gadget and dual-role modes support
Build DWC3 driver in the right mode: - host mode if kernel have usb host support only. - gadget mode if kernel have usbgadget support only. - dual-role mode if kernel have both usb host and usbgadget support. Signed-off-by: Thomas Richard <thomas.richard@bootlin.com> Link: https://github.com/openwrt/openwrt/pull/19246 Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
This commit is contained in:
parent
0f782fc2e9
commit
0546f8b74d
@ -508,17 +508,28 @@ $(eval $(call KernelPackage,usb-cdns3))
|
|||||||
|
|
||||||
|
|
||||||
define KernelPackage/usb-dwc3
|
define KernelPackage/usb-dwc3
|
||||||
|
SUBMENU:=$(USB_MENU)
|
||||||
TITLE:=DWC3 USB controller driver
|
TITLE:=DWC3 USB controller driver
|
||||||
|
DEPENDS:=+USB_GADGET_SUPPORT:kmod-usb-gadget \
|
||||||
|
+USB_SUPPORT:kmod-usb-core \
|
||||||
|
+kmod-usb-roles
|
||||||
KCONFIG:= \
|
KCONFIG:= \
|
||||||
CONFIG_USB_DWC3 \
|
CONFIG_USB_DWC3 \
|
||||||
CONFIG_USB_DWC3_HOST=y \
|
|
||||||
CONFIG_USB_DWC3_GADGET=n \
|
|
||||||
CONFIG_USB_DWC3_DUAL_ROLE=n \
|
|
||||||
CONFIG_USB_DWC3_DEBUG=n \
|
CONFIG_USB_DWC3_DEBUG=n \
|
||||||
CONFIG_USB_DWC3_VERBOSE=n
|
CONFIG_USB_DWC3_VERBOSE=n
|
||||||
|
ifeq ($(CONFIG_USB_SUPPORT)$(CONFIG_USB_GADGET_SUPPORT),yy)
|
||||||
|
KCONFIG+= \
|
||||||
|
CONFIG_USB_DWC3_HOST=n \
|
||||||
|
CONFIG_USB_DWC3_GADGET=n \
|
||||||
|
CONFIG_USB_DWC3_DUAL_ROLE=y
|
||||||
|
else
|
||||||
|
KCONFIG+= \
|
||||||
|
CONFIG_USB_DWC3_HOST=$(if $(CONFIG_USB_SUPPORT),y,n) \
|
||||||
|
CONFIG_USB_DWC3_GADGET=$(if $(CONFIG_USB_GADGET_SUPPORT),y,n) \
|
||||||
|
CONFIG_USB_DWC3_DUAL_ROLE=n
|
||||||
|
endif
|
||||||
FILES:= $(LINUX_DIR)/drivers/usb/dwc3/dwc3.ko
|
FILES:= $(LINUX_DIR)/drivers/usb/dwc3/dwc3.ko
|
||||||
AUTOLOAD:=$(call AutoLoad,54,dwc3,1)
|
AUTOLOAD:=$(call AutoLoad,54,dwc3,1)
|
||||||
$(call AddDepends/usb)
|
|
||||||
endef
|
endef
|
||||||
|
|
||||||
define KernelPackage/usb-dwc3/description
|
define KernelPackage/usb-dwc3/description
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user