Multi-color LEDs connected to PWM
Schema identifier ($id): "http://devicetree.org/schemas/leds/leds-pwm-multicolor.yaml#"
Schema dialect ($schema): "http://devicetree.org/meta-schemas/core.yaml#"
Maintainers (maintainers): "Sven Schwermer <sven.schwermer@disruptive-technologies.com>"
This driver combines several monochrome PWM LEDs into one multi-color LED using the multicolor LED class.
Properties and child nodes (properties) #
compatible — required here #
Exact value (const): "pwm-leds-multicolor"
multi-led — not listed as required here #
Value type (type): "object"
Shared schema rule ($ref): leds-class-multicolor.yaml#
Properties not evaluated by applicable rules (unevaluatedProperties) #
false
Not allowed by this rule.
Properties and child nodes (properties) #
max-brightness — not listed as required here
Maximum brightness possible for the LED
Shared schema rule ($ref): /schemas/types.yaml#/definitions/uint32
Properties matching a name pattern (patternProperties) #
^led-[0-9a-z]+$ — name matches this regular expression
Value type (type): "object"
Shared schema rule ($ref): common.yaml#
Properties not matched by properties or patternProperties in this schema (additionalProperties)
false
Not allowed by this rule.
Properties and child nodes (properties)
pwms — required here
Maximum number of items (maxItems): 1
pwm-names — not listed as required here
true — No constraints added by this property rule.
active-low — not listed as required here
true — No constraints added by this property rule.
color — required here
true — No constraints added by this property rule.
Required in this object (required): "pwms", "color"
Required in this object (required): "compatible"
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-controller {
compatible = "pwm-leds-multicolor";
multi-led {
color = <LED_COLOR_ID_RGB>;
function = LED_FUNCTION_INDICATOR;
max-brightness = <65535>;
led-red {
pwms = <&pwm1 0 1000000>;
color = <LED_COLOR_ID_RED>;
};
led-green {
pwms = <&pwm2 0 1000000>;
color = <LED_COLOR_ID_GREEN>;
};
led-blue {
pwms = <&pwm3 0 1000000>;
color = <LED_COLOR_ID_BLUE>;
};
};
};
Source notes #
Annotations retained from the schema source
Line 1: SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)