ARM64: defconfig: add support for PWM LEDs
Martin Blumenstingl
reviewercover ARM64: defconfig: add support for PWM LEDs
Some ARM64 boards (such as the Khadas VIM and many other Amlogic based devices) have one of the LEDs connected through a PWM controller. This allows dimming the LED.
The ARM64 defconfig does not support the leds-pwm driver yet. Enabling that also means that we have to enable the default-on LED trigger. leds-gpio has a (trigger specific) "default-state" property which can be used to set the default state, while with leds-pwm this has to be configured using the default-on trigger.
Martin Blumenstingl (1):
ARM64: defconfig: enable the leds-pwm driver and default-on trigger
arch/arm64/configs/defconfig | 2 ++ 1 file changed, 2 insertions(+)
Signature · 1 line
2.11.1
Martin Blumenstingl
reviewerPATCH 1/1 ARM64: defconfig: enable the leds-pwm driver and default-on trigger
This enables the leds-pwm driver to support LEDs which are PWM-powered (and thus dimmable). Additionally we have to enable the "default-on" trigger - this was not required before because the gpio-leds driver has a separate "default-state" property which can be used to enable the LED by default.
--- arch/arm64/configs/defconfig | 2 ++ 1 file changed, 2 insertions(+)
arch/arm64/configs/defconfig +2 -0
@@ -394,8 +394,10 @@ CONFIG_MMC_SUNXI=y CONFIG_NEW_LEDS=y CONFIG_LEDS_CLASS=y CONFIG_LEDS_GPIO=y +CONFIG_LEDS_PWM=y CONFIG_LEDS_SYSCON=y CONFIG_LEDS_TRIGGERS=y +CONFIG_LEDS_TRIGGER_DEFAULT_ON=y CONFIG_LEDS_TRIGGER_HEARTBEAT=y CONFIG_LEDS_TRIGGER_CPU=y CONFIG_RTC_CLASS=y
Signature · 1 line
2.11.1
PATCH 1/1 ARM64: defconfig: enable the leds-pwm driver and default-on trigger
Quoted 7 lines · Martin Blumenstingl
This enables the leds-pwm driver to support LEDs which are PWM-powered (and thus dimmable). Additionally we have to enable the "default-on" trigger - this was not required before because the gpio-leds driver has a separate "default-state" property which can be used to enable the LED by default.
Signed-off-by Martin Blumenstingl <[email protected]>
Applied to v4.12/defconfig of amlogic tree.
Kevin
Quoted 19 lines
--- arch/arm64/configs/defconfig | 2 ++ 1 file changed, 2 insertions(+)arch/arm64/configs/defconfig +2
-0@@ -394,8 +394,10 @@ CONFIG_MMC_SUNXI=y CONFIG_NEW_LEDS=y CONFIG_LEDS_CLASS=y CONFIG_LEDS_GPIO=y +CONFIG_LEDS_PWM=y CONFIG_LEDS_SYSCON=y CONFIG_LEDS_TRIGGERS=y +CONFIG_LEDS_TRIGGER_DEFAULT_ON=y CONFIG_LEDS_TRIGGER_HEARTBEAT=y CONFIG_LEDS_TRIGGER_CPU=y CONFIG_RTC_CLASS=y