diff options
author | Ivan Vozvakhov <i.vozvakhov@corp.mail.ru> | 2022-03-12 13:03:14 +0300 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2022-04-11 11:39:19 -0400 |
commit | 067cfc1c2ea382b0820d995f476e2a26713a3200 (patch) | |
tree | 516ec99c44582bda5a4a60add5987cd41847e91a /doc | |
parent | 81eff51047e2fb29f518f8a3721f539a68a11b6d (diff) | |
download | u-boot-067cfc1c2ea382b0820d995f476e2a26713a3200.tar.gz u-boot-067cfc1c2ea382b0820d995f476e2a26713a3200.tar.bz2 u-boot-067cfc1c2ea382b0820d995f476e2a26713a3200.zip |
led: led_pwm: Add a driver for LEDs connected to PWM
Add a driver which allows to use of LEDs connected
to PWM (Linux compatible).
MAINTAINERS: add i.vozvakhov as a maintainer of leds-pwm
C(required during new functionality adding).
Signed-off-by: Ivan Vozvakhov <i.vozvakhov@corp.mail.ru>
Diffstat (limited to 'doc')
-rw-r--r-- | doc/device-tree-bindings/leds/leds-pwm.txt | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/doc/device-tree-bindings/leds/leds-pwm.txt b/doc/device-tree-bindings/leds/leds-pwm.txt new file mode 100644 index 0000000000..186e8a848f --- /dev/null +++ b/doc/device-tree-bindings/leds/leds-pwm.txt @@ -0,0 +1,47 @@ +LEDs connected to PWM (Linux compatible) + +Required properties: +- compatible : should be "pwm-leds". + +Each LED is represented as a sub-node of the pwm-leds device. Each +node's name represents the name of the corresponding LED. + +LED sub-node properties: +- pwms : (required) LED pwm channel, see "pwms property" in + doc/device-tree-bindings/pwm/pwm.txt +- label : (optional) LED label, see "label property" in + doc/device-tree-bindings/led/common.txt +- max-brightness : (optional, unsigned, default 255) Maximum brightness possible + for the LED +- active-low : (optional, boolean, default false) For PWMs where the LED is + wired to supply rather than ground +- u-boot,default-brightness : (optional, unsigned, default 0) Initial state + of pwm-leds + +Example: + +leds { + compatible = "pwm-leds"; + status = "okay"; + + blue { + label = "led-blue"; + pwms = <&pwm1 0 100000 0>; + max-brightness = <255>; + u-boot,default-brightness = <127>; + }; + + green { + label = "led-green"; + pwms = <&pwm2 0 100000 0>; + max-brightness = <255>; + u-boot,default-brightness = <127>; + }; + + red { + label = "led-red"; + pwms = <&pwm3 0 100000 0>; + max-brightness = <255>; + u-boot,default-brightness = <127>; + }; +} |