Skip to content

Commit e6f9e6d

Browse files
committed
drivers: led: pwm: automatically select PWM
For all LED drivers, the underlying subsystem is automatically selected in Kconfig if their compatible node is found in DT. The only exception is the PWM LED driver which depends on PWM instead of selecting it. The PWM Kconfig option must be explicitely selected in order to have LED_PWM enabled. This patch updates the Kconfig of the PWM LED driver to have the same behavior as other LED drivers: PWM is now automatically selected if a "pwm-leds" compatible node is found in DT. Signed-off-by: Simon Guinot <simon.guinot@seagate.com>
1 parent ad4c3e3 commit e6f9e6d

File tree

3 files changed

+2
-4
lines changed

3 files changed

+2
-4
lines changed

drivers/led/Kconfig.pwm

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
config LED_PWM
55
bool "PWM LED driver"
66
default y
7-
depends on PWM && DT_HAS_PWM_LEDS_ENABLED
7+
depends on DT_HAS_PWM_LEDS_ENABLED
8+
select PWM
89
help
910
Enable driver for PWM LEDs.

samples/drivers/led/pwm/prj.conf

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
CONFIG_LOG=y
22

3-
CONFIG_PWM=y
4-
53
CONFIG_LED=y
64

75
CONFIG_LOG_MODE_IMMEDIATE=y

tests/drivers/build_all/led/prj.conf

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
11
CONFIG_TEST=y
22
CONFIG_TEST_USERSPACE=y
33
CONFIG_LED=y
4-
CONFIG_PWM=y

0 commit comments

Comments
 (0)