File Index
Files and directories
Sign in
FILE

leds-group-multicolor.yaml

File preview with syntax highlighting.

linux-6.19.14/Documentation/devicetree/bindings/leds/leds-group-multicolor.yaml YAML
 1# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
 2%YAML 1.2
 3---
 4$id: http://devicetree.org/schemas/leds/leds-group-multicolor.yaml#
 5$schema: http://devicetree.org/meta-schemas/core.yaml#
 6
 7title: Multi-color LED built with monochromatic LEDs
 8
 9maintainers:
10  - Jean-Jacques Hiblot <jjhiblot@traphandler.com>
11
12description: |
13  This driver combines several monochromatic LEDs into one multi-color
14  LED using the multicolor LED class.
15
16properties:
17  compatible:
18    const: leds-group-multicolor
19
20  leds: true
21
22required:
23  - leds
24
25allOf:
26  - $ref: leds-class-multicolor.yaml#
27
28unevaluatedProperties: false
29
30examples:
31  - |
32    #include <dt-bindings/gpio/gpio.h>
33    #include <dt-bindings/leds/common.h>
34
35    monochromatic-leds {
36        compatible = "gpio-leds";
37
38        led0: led-0 {
39            gpios = <&mcu_pio 0 GPIO_ACTIVE_LOW>;
40            color = <LED_COLOR_ID_RED>;
41        };
42
43        led1: led-1 {
44            gpios = <&mcu_pio 1 GPIO_ACTIVE_HIGH>;
45            color = <LED_COLOR_ID_GREEN>;
46        };
47
48        led2: led-2 {
49            gpios = <&mcu_pio 2 GPIO_ACTIVE_HIGH>;
50            color = <LED_COLOR_ID_BLUE>;
51        };
52    };
53
54    multi-led {
55        compatible = "leds-group-multicolor";
56        color = <LED_COLOR_ID_RGB>;
57        function = LED_FUNCTION_INDICATOR;
58        leds = <&led0>, <&led1>, <&led2>;
59    };
60
61...
~/ Read-only file preview.