kernel: package media controller driver
authorThomas Richard <thomas.richard@bootlin.com>
Tue, 5 Nov 2024 10:10:44 +0000 (11:10 +0100)
committerHauke Mehrtens <hauke@hauke-m.de>
Sat, 23 Nov 2024 14:53:21 +0000 (15:53 +0100)
It is needed for the stm32/stm32mp1 subtarget.

Signed-off-by: Thomas Richard <thomas.richard@bootlin.com>
Link: https://github.com/openwrt/openwrt/pull/16716
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
package/kernel/linux/modules/video.mk

index f2fa82fd039c78cdee961c42e6f093d080393523..486b9b9ab1f0b7d227e43753c90d680fcb2c58f9 100644 (file)
@@ -12,6 +12,28 @@ V4L2_DIR=v4l2-core
 V4L2_USB_DIR=usb
 V4L2_MEM2MEM_DIR=platform
 
+#
+# Media
+#
+define KernelPackage/media-controller
+  SUBMENU:=$(VIDEO_MENU)
+  TITLE:=Media Controller API
+  KCONFIG:= \
+       CONFIG_MEDIA_SUPPORT \
+       CONFIG_MEDIA_CONTROLLER=y
+  FILES:= \
+       $(LINUX_DIR)/drivers/media/mc/mc.ko
+  AUTOLOAD:=$(call AutoProbe,mc)
+endef
+
+define KernelPackage/media-controller/description
+ Kernel modules for media controller API used to query media devices
+ internal topology and configure it dynamically.
+endef
+
+$(eval $(call KernelPackage,media-controller))
+
+
 #
 # Video Display
 #
@@ -601,9 +623,8 @@ $(eval $(call KernelPackage,drm-radeon))
 define KernelPackage/video-core
   SUBMENU:=$(VIDEO_MENU)
   TITLE=Video4Linux support
-  DEPENDS:=+PACKAGE_kmod-i2c-core:kmod-i2c-core
+  DEPENDS:=+PACKAGE_kmod-i2c-core:kmod-i2c-core +kmod-media-controller
   KCONFIG:= \
-       CONFIG_MEDIA_SUPPORT \
        CONFIG_MEDIA_CAMERA_SUPPORT=y \
        CONFIG_VIDEO_DEV \
        CONFIG_V4L_PLATFORM_DRIVERS=y \