162306a36Sopenharmony_ci# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
262306a36Sopenharmony_ci%YAML 1.2
362306a36Sopenharmony_ci---
462306a36Sopenharmony_ci$id: http://devicetree.org/schemas/leds/regulator-led.yaml#
562306a36Sopenharmony_ci$schema: http://devicetree.org/meta-schemas/core.yaml#
662306a36Sopenharmony_ci
762306a36Sopenharmony_cititle: Regulator LEDs
862306a36Sopenharmony_ci
962306a36Sopenharmony_cimaintainers:
1062306a36Sopenharmony_ci  - Linus Walleij <linus.walleij@linaro.org>
1162306a36Sopenharmony_ci
1262306a36Sopenharmony_cidescription: |
1362306a36Sopenharmony_ci  Regulator LEDs are powered by a single regulator such that they can
1462306a36Sopenharmony_ci  be turned on or off by enabling or disabling the regulator. The available
1562306a36Sopenharmony_ci  brightness settings will be inferred from the available voltages on the
1662306a36Sopenharmony_ci  regulator, and any constraints on the voltage or current will need to be
1762306a36Sopenharmony_ci  specified on the regulator.
1862306a36Sopenharmony_ci
1962306a36Sopenharmony_ciallOf:
2062306a36Sopenharmony_ci  - $ref: common.yaml#
2162306a36Sopenharmony_ci
2262306a36Sopenharmony_ciproperties:
2362306a36Sopenharmony_ci  $nodename:
2462306a36Sopenharmony_ci    pattern: '^led.*$'
2562306a36Sopenharmony_ci
2662306a36Sopenharmony_ci  compatible:
2762306a36Sopenharmony_ci    const: regulator-led
2862306a36Sopenharmony_ci
2962306a36Sopenharmony_ci  vled-supply:
3062306a36Sopenharmony_ci    description:
3162306a36Sopenharmony_ci      The regulator controlling the current to the LED.
3262306a36Sopenharmony_ci
3362306a36Sopenharmony_ci  function: true
3462306a36Sopenharmony_ci  color: true
3562306a36Sopenharmony_ci  linux,default-trigger: true
3662306a36Sopenharmony_ci  default-state: true
3762306a36Sopenharmony_ci
3862306a36Sopenharmony_cirequired:
3962306a36Sopenharmony_ci  - compatible
4062306a36Sopenharmony_ci  - vled-supply
4162306a36Sopenharmony_ci
4262306a36Sopenharmony_ciadditionalProperties: false
4362306a36Sopenharmony_ci
4462306a36Sopenharmony_ciexamples:
4562306a36Sopenharmony_ci  - |
4662306a36Sopenharmony_ci    #include <dt-bindings/leds/common.h>
4762306a36Sopenharmony_ci
4862306a36Sopenharmony_ci    led-heartbeat {
4962306a36Sopenharmony_ci        compatible = "regulator-led";
5062306a36Sopenharmony_ci        vled-supply = <&regulator>;
5162306a36Sopenharmony_ci        function = LED_FUNCTION_STATUS;
5262306a36Sopenharmony_ci        color = <LED_COLOR_ID_BLUE>;
5362306a36Sopenharmony_ci        linux,default-trigger = "heartbeat";
5462306a36Sopenharmony_ci    };
5562306a36Sopenharmony_ci...
56