kernel: Package the new FOTG210 module properly
authorLinus Walleij <linus.walleij@linaro.org>
Wed, 31 May 2023 21:21:07 +0000 (23:21 +0200)
committerChristian Lamparter <chunkeey@gmail.com>
Thu, 1 Jun 2023 21:54:20 +0000 (23:54 +0200)
When using the Gemini, we apply patches that create a single
module that support both host and device mode these days.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
(move module to gemini target, keep both 6.1+2-ish + 5.15 module
CONFIG and files around until 5.15 is dropped)
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
package/kernel/linux/modules/usb.mk
target/linux/gemini/modules.mk [new file with mode: 0644]

index 721e17f9708758d27af4f49b9b62cbec19645f93..644365ed19e1fab89495d0eaa61846f84740ae02 100644 (file)
@@ -331,17 +331,6 @@ define KernelPackage/usb-bcma
 endef
 $(eval $(call KernelPackage,usb-bcma))
 
-define KernelPackage/usb-fotg210
-  TITLE:=Support for FOTG210 USB host controllers
-  DEPENDS:=@USB_SUPPORT @TARGET_gemini
-  KCONFIG:=CONFIG_USB_FOTG210_HCD
-  FILES:= \
-       $(if $(CONFIG_USB_FOTG210_HCD),$(LINUX_DIR)/drivers/usb/host/fotg210-hcd.ko)
-  AUTOLOAD:=$(call AutoLoad,50,fotg210-hcd,1)
-  $(call AddDepends/usb)
-endef
-$(eval $(call KernelPackage,usb-fotg210))
-
 define KernelPackage/usb-ssb
   TITLE:=Support for SSB USB controllers
   DEPENDS:=@USB_SUPPORT @TARGET_bcm47xx
diff --git a/target/linux/gemini/modules.mk b/target/linux/gemini/modules.mk
new file mode 100644 (file)
index 0000000..104ad90
--- /dev/null
@@ -0,0 +1,14 @@
+define KernelPackage/usb-fotg210
+  TITLE:=Support for FOTG210 USB host and device controllers
+  DEPENDS:=@USB_SUPPORT @TARGET_gemini
+  KCONFIG:=CONFIG_USB_FOTG210 \
+       CONFIG_USB_FOTG210_HCD
+  FILES:=$(if $(CONFIG_USB_FOTG210_HCD),$(LINUX_DIR)/drivers/usb/host/fotg210-hcd.ko@lt6.1) \
+       $(if $(CONFIG_USB_FOTG210),$(LINUX_DIR)/drivers/usb/fotg210/fotg210.ko@ge6.1)
+  AUTOLOAD:=$(call AutoLoad,50, \
+       $(if $(CONFIG_USB_FOTG210_HCD),fotg210-hcd@lt6.1) \
+       $(if $(CONFIG_USB_FOTG210),fotg210@ge6.1),1)
+  $(call AddDepends/usb)
+endef
+
+$(eval $(call KernelPackage,usb-fotg210))