[openwrt/openwrt] kernel: kmod-backlight-pwm/kmod-hwmon-pwmfan: Depend on PWM_SUPPORT

LEDE Commits lede-commits at lists.infradead.org
Fri Jul 25 16:47:37 PDT 2025


hauke pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/810b86fb7d15a48552bda95c03c83df75d57a209

commit 810b86fb7d15a48552bda95c03c83df75d57a209
Author: Hauke Mehrtens <hauke at hauke-m.de>
AuthorDate: Sun Jul 20 18:24:45 2025 +0200

    kernel: kmod-backlight-pwm/kmod-hwmon-pwmfan: Depend on PWM_SUPPORT
    
    These drivers depend on the kernel option CONFIG_PWM, only add them to
    OpenWrt for targets which have PWM support.
    
    Link: https://github.com/openwrt/openwrt/pull/19480
    Signed-off-by: Hauke Mehrtens <hauke at hauke-m.de>
---
 package/kernel/linux/modules/hwmon.mk | 2 +-
 package/kernel/linux/modules/video.mk | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/package/kernel/linux/modules/hwmon.mk b/package/kernel/linux/modules/hwmon.mk
index 8e22243481..21c522edcd 100644
--- a/package/kernel/linux/modules/hwmon.mk
+++ b/package/kernel/linux/modules/hwmon.mk
@@ -529,7 +529,7 @@ define KernelPackage/hwmon-pwmfan
   KCONFIG:=CONFIG_SENSORS_PWM_FAN
   FILES:=$(LINUX_DIR)/drivers/hwmon/pwm-fan.ko
   AUTOLOAD:=$(call AutoLoad,60,pwm-fan)
-  $(call AddDepends/hwmon, +PACKAGE_kmod-thermal:kmod-thermal)
+  $(call AddDepends/hwmon, at PWM_SUPPORT +PACKAGE_kmod-thermal:kmod-thermal)
 endef
 
 define KernelPackage/hwmon-pwmfan/description
diff --git a/package/kernel/linux/modules/video.mk b/package/kernel/linux/modules/video.mk
index 9472c67b80..a024ac0fed 100644
--- a/package/kernel/linux/modules/video.mk
+++ b/package/kernel/linux/modules/video.mk
@@ -86,7 +86,7 @@ $(eval $(call KernelPackage,backlight))
 define KernelPackage/backlight-pwm
 	SUBMENU:=$(VIDEO_MENU)
 	TITLE:=PWM Backlight support
-	DEPENDS:=+kmod-backlight
+	DEPENDS:=@PWM_SUPPORT +kmod-backlight
 	KCONFIG:=CONFIG_BACKLIGHT_PWM
 	FILES:=$(LINUX_DIR)/drivers/video/backlight/pwm_bl.ko
 	AUTOLOAD:=$(call AutoProbe,video pwm_bl)




More information about the lede-commits mailing list