Skip to contentSkip to conversation

ARM64: defconfig: add support for PWM LEDs

PATCH New Martin Blumenstingl 2 participants 3 messages Feb 19, 2017 – Mar 3, 2017 Arm/Amlogic Meson SoC support

lore
Share & tools
lore

Martin Blumenstingl

author reviewer
#0 lore raw

cover 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
author reviewer
#1 lore raw

PATCH 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
index 33b744d54739..b36d02ce6154 100644
@@ -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
maintainer Applied
#2 lore raw

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.

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
index 33b744d54739..b36d02ce6154 100644
@@ -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