diff options
author | Fabio Baltieri <fabiobaltieri@google.com> | 2021-09-21 17:51:59 +0000 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2021-09-22 19:38:32 +0000 |
commit | 53abdfdbed2cc4b4ad04b84514f773ed50458c61 (patch) | |
tree | 9569f2b6536667880a8c93ab22a8c32cb0ddc93a | |
parent | e64382a267cffe66b514917b5734f174fe8c418a (diff) | |
download | chrome-ec-53abdfdbed2cc4b4ad04b84514f773ed50458c61.tar.gz |
zephyr: shim: add an example for the leds property and make it required
Add a complete example for the cros-ec,pwm-leds leds property, and mark
it as required since the whole LED functionality depends on it.
BRANCH=none
BUG=none
TEST=build and run
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
Change-Id: I6d875b1a3a436baa77b6c15b8018e4b37102bb46
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3174051
Reviewed-by: Keith Short <keithshort@chromium.org>
Commit-Queue: Keith Short <keithshort@chromium.org>
-rw-r--r-- | zephyr/dts/bindings/led/cros-ec,pwm-leds.yaml | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/zephyr/dts/bindings/led/cros-ec,pwm-leds.yaml b/zephyr/dts/bindings/led/cros-ec,pwm-leds.yaml index cc27013ca9..2a16c9150c 100644 --- a/zephyr/dts/bindings/led/cros-ec,pwm-leds.yaml +++ b/zephyr/dts/bindings/led/cros-ec,pwm-leds.yaml @@ -11,9 +11,26 @@ include: base.yaml properties: leds: type: phandles + required: true description: | List of pwm-leds nodes. These are expected to have a pwms property pointing to the relevant PWMs, in red, green, blue and optionally sidesel order. + For example + pwmleds { + compatible = "pwm-leds"; + pwm_led0: pwm_led_0 { + pwms = <&led3_red + &led2_green + &led1_blue + &led3_sidesel + >; + }; + }; + cros-pwmleds { + compatible = "cros-ec,pwm-leds"; + leds = <&pwm_led0>; + }; + # TODO(b/177452529): add led_color_map support |