summaryrefslogtreecommitdiff
path: root/zephyr/dts/bindings/leds/cros-ec,gpio-led-pins.yaml
diff options
context:
space:
mode:
Diffstat (limited to 'zephyr/dts/bindings/leds/cros-ec,gpio-led-pins.yaml')
-rw-r--r--zephyr/dts/bindings/leds/cros-ec,gpio-led-pins.yaml45
1 files changed, 27 insertions, 18 deletions
diff --git a/zephyr/dts/bindings/leds/cros-ec,gpio-led-pins.yaml b/zephyr/dts/bindings/leds/cros-ec,gpio-led-pins.yaml
index 53688a8172..2e5fe7cff0 100644
--- a/zephyr/dts/bindings/leds/cros-ec,gpio-led-pins.yaml
+++ b/zephyr/dts/bindings/leds/cros-ec,gpio-led-pins.yaml
@@ -1,4 +1,4 @@
-# Copyright 2022 The Chromium OS Authors. All rights reserved.
+# Copyright 2022 The ChromiumOS Authors
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
@@ -7,20 +7,24 @@ description: GPIO LED pins parent node
compatible: "cros-ec,gpio-led-pins"
child-binding:
- description: Each child node describes all the GPIO pins that need to be
- altered to set a specific color. Eg. for a board supporting
- Blue and Amber LEDs - to set LED_AMBER color, amber LED will
- need to be set to 1 and blue LED to 0. So a node looks like
- color-amber {
- led-color = "LED_AMBER";
- led-pins = <&gpio_ec_chg_led_y_c1 1>,
- <&gpio_ec_chg_led_b_c1 0>;
- };
+ description: |
+ Each child node describes all the GPIO pins that need to be altered to set
+ a specific color.
+ e.g. For a board supporting Blue and Amber LEDs - to set LED_AMBER color,
+ amber LED will need to be set to 1 and blue LED to 0. 1 always turns on
+ the LED and 0 always turns off the LED. So a node looks like
+ color-amber {
+ led-color = "LED_AMBER";
+ led-pins = <&gpio_ec_chg_led_y_c1 1>,
+ <&gpio_ec_chg_led_b_c1 0>;
+ };
properties:
led-color:
type: string
required: true
- description: Used to link the color nodes with the pin nodes
+ description: |
+ This property is used to identify pin nodes based on color enum.
+ It is required by the EC_CMD_LED_CONTROL host command.
enum:
- LED_OFF
- LED_RED
@@ -32,10 +36,9 @@ child-binding:
led-id:
type: string
required: true
- description: Used to link the color nodes with the pin nodes in
- case of multiple LEDs. Also required by ectool to
- identify led-ids supported. It needs to match the
- enum names defined in ec_commands.h
+ description: |
+ This property is required by the EC_CMD_LED_CONTROL host command.
+ It must match the enum names defined in ec_commands.h.
enum:
- EC_LED_ID_BATTERY_LED
- EC_LED_ID_POWER_LED
@@ -47,8 +50,9 @@ child-binding:
br-color:
type: string
required: false
- description: This is used in the ectool brightness range APIs.
- It needs to match the enum names defined in ec_commands.h
+ description: |
+ This is used in the ectool brightness range APIs. It must match
+ the enum names defined in ec_commands.h.
enum:
- EC_LED_COLOR_RED
- EC_LED_COLOR_GREEN
@@ -58,4 +62,9 @@ child-binding:
- EC_LED_COLOR_AMBER
led-pins:
type: phandle-array
- required: false
+ required: true
+ description: |
+ This property is used to specify an array of gpio pins and
+ corresponding values to enable a particular color.
+ e.g. Amber color - led-pins = <&gpio_ec_chg_led_y_c1 1>,
+ <&gpio_ec_chg_led_b_c1 0>;