[OpenWrt-Devel] [PATCH v6 1/3] kernel: add backlight kernel module support

Tim Harvey tharvey at gateworks.com
Wed Jan 20 17:03:48 EST 2016


Signed-off-by: Tim Harvey <tharvey at gateworks.com>
---
v5: moved to video.mk
v4: no changes
v3: added support for Linux 4.3 (new driver needs to be disabled by default)
v2: no changes

Signed-off-by: Tim Harvey <tharvey at gateworks.com>
---
 package/kernel/linux/modules/video.mk | 46 +++++++++++++++++++++++++++++++++++
 1 file changed, 46 insertions(+)

diff --git a/package/kernel/linux/modules/video.mk b/package/kernel/linux/modules/video.mk
index 4226adc..61d7d88 100644
--- a/package/kernel/linux/modules/video.mk
+++ b/package/kernel/linux/modules/video.mk
@@ -11,6 +11,52 @@ VIDEO_MENU:=Video Support
 V4L2_DIR=v4l2-core
 V4L2_USB_DIR=usb
 
+#
+# Video Display
+#
+
+define KernelPackage/backlight
+	SUBMENU:=$(VIDEO_MENU)
+	TITLE:=Backlight support
+	KCONFIG:=CONFIG_BACKLIGHT_CLASS_DEVICE=m \
+		CONFIG_BACKLIGHT_LCD_SUPPORT=y \
+		CONFIG_LCD_CLASS_DEVICE=n \
+		CONFIG_BACKLIGHT_PWM=n \
+		CONFIG_BACKLIGHT_GENERIC=n \
+		CONFIG_BACKLIGHT_ADP8860=n \
+		CONFIG_BACKLIGHT_ADP8870=n \
+		CONFIG_BACKLIGHT_PM8941_WLED=n
+	FILES:=$(LINUX_DIR)/drivers/video/backlight/backlight.ko
+	AUTOLOAD:=$(call AutoProbe,video backlight)
+endef
+
+define KernelPackage/backlight/description
+	Kernel module for Backlight support.
+endef
+
+$(eval $(call KernelPackage,backlight))
+
+define AddDepends/backlight
+	SUBMENU:=$(VIDEO_MENU)
+	DEPENDS+=kmod-backlight $(1)
+endef
+
+define KernelPackage/backlight-pwm
+	TITLE:=PWM Backlight support
+	DEPENDS:=+kmod-pwm
+	KCONFIG:=CONFIG_BACKLIGHT_PWM=m
+	FILES:=$(LINUX_DIR)/drivers/video/backlight/pwm_bl.ko
+	AUTOLOAD:=$(call AutoProbe,video pwm_bl)
+	$(call AddDepends/backlight)
+endef
+
+define KernelPackage/backlight/backlight-pwm
+	Kernel module for PWM based Backlight support.
+endef
+
+$(eval $(call KernelPackage,backlight-pwm))
+
+
 define KernelPackage/fb
   SUBMENU:=$(VIDEO_MENU)
   TITLE:=Framebuffer support
-- 
1.9.1
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel



More information about the openwrt-devel mailing list