diff options
author | Linus Walleij <linus.walleij@linaro.org> | 2022-04-04 22:35:20 +0200 |
---|---|---|
committer | Pavel Machek <pavel@ucw.cz> | 2022-05-05 10:04:21 +0200 |
commit | 5a71917f3b43b9fd6d6ff7b0622a85153bf184cb (patch) | |
tree | caf4e070616093bff8ad148f8651674a634fe24a /Documentation | |
parent | c55f75c4f9c01934341b59ba8ac7492c13423e5b (diff) | |
download | linux-5a71917f3b43b9fd6d6ff7b0622a85153bf184cb.tar.bz2 |
dt-bindings: leds: Add regulator-led binding
The regulator is a LED connected directly to a regulator and with
its brightness controlled by the voltage of the regulator.
Cc: devicetree@vger.kernel.org
Cc: Antonio Ospite <ao2@ao2.it>
Reviewed-by: Rob Herring <robh@kernel.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Pavel Machek <pavel@ucw.cz>
Diffstat (limited to 'Documentation')
-rw-r--r-- | Documentation/devicetree/bindings/leds/regulator-led.yaml | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/Documentation/devicetree/bindings/leds/regulator-led.yaml b/Documentation/devicetree/bindings/leds/regulator-led.yaml new file mode 100644 index 000000000000..3e020d700c00 --- /dev/null +++ b/Documentation/devicetree/bindings/leds/regulator-led.yaml @@ -0,0 +1,55 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/leds/regulator-led.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Device Tree Bindings for Regulator LEDs + +maintainers: + - Linus Walleij <linus.walleij@linaro.org> + +description: | + Regulator LEDs are powered by a single regulator such that they can + be turned on or off by enabling or disabling the regulator. The available + brightness settings will be inferred from the available voltages on the + regulator, and any constraints on the voltage or current will need to be + specified on the regulator. + +allOf: + - $ref: common.yaml# + +properties: + $nodename: + pattern: '^led.*$' + + compatible: + const: regulator-led + + vled-supply: + description: + The regulator controlling the current to the LED. + + function: true + color: true + linux,default-trigger: true + default-state: true + +required: + - compatible + - vled-supply + +additionalProperties: false + +examples: + - | + #include <dt-bindings/leds/common.h> + + led-heartbeat { + compatible = "regulator-led"; + vled-supply = <®ulator>; + function = LED_FUNCTION_STATUS; + color = <LED_COLOR_ID_BLUE>; + linux,default-trigger = "heartbeat"; + }; +... |