Regulator LEDs

Schema identifier ($id): "http://devicetree.org/schemas/leds/regulator-led.yaml#"

Schema dialect ($schema): "http://devicetree.org/meta-schemas/core.yaml#"

Maintainers (maintainers): "Linus Walleij <linusw@kernel.org>"

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.

All of these rules must match (allOf) #

Rule 1 #

Shared schema rule ($ref): common.yaml#

Properties and child nodes (properties) #

$nodename — not listed as required here #

String pattern (pattern): "^led.*$"

compatible — required here #

Exact value (const): "regulator-led"

vled-supply — required here #

The regulator controlling the current to the LED.

function — not listed as required here #

true — No constraints added by this property rule.

color — not listed as required here #

true — No constraints added by this property rule.

linux,default-trigger — not listed as required here #

true — No constraints added by this property rule.

default-state — not listed as required here #

true — No constraints added by this property rule.

Required in this object (required): "compatible", "vled-supply"

Properties not matched by properties or patternProperties in this schema (additionalProperties) #

false

Not allowed by this rule.

Examples (examples) #

#include <dt-bindings/leds/common.h>

led-heartbeat {
    compatible = "regulator-led";
    vled-supply = <&regulator>;
    function = LED_FUNCTION_STATUS;
    color = <LED_COLOR_ID_BLUE>;
    linux,default-trigger = "heartbeat";
};

Source notes #

Annotations retained from the schema source

Line 1: SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)

Edit this page