summaryrefslogtreecommitdiff
path: root/Documentation/devicetree/bindings/leds/ti,tlc59116.yaml
blob: ce9713793908ac653f5a5c4031e3dd1c1b31a16b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/leds/ti,tlc59116.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: LEDs connected to tlc59116 or tlc59108

maintainers:
  - Andrew Lunn <andrew@lunn.ch>

properties:
  compatible:
    enum:
      - ti,tlc59108
      - ti,tlc59116

  reg:
    maxItems: 1

  "#address-cells":
    const: 1

  "#size-cells":
    const: 0

patternProperties:
  "^led@[0-9a-f]$":
    type: object
    $ref: common.yaml#
    properties:
      reg:
        items:
          minimum: 0
          maximum: 15

    unevaluatedProperties: false

required:
  - compatible
  - reg
  - "#address-cells"
  - "#size-cells"

allOf:
  - if:
      properties:
        compatible:
          contains:
            const: ti,tlc59108
    then:
      patternProperties:
        "^led@[0-9a-f]$":
          properties:
            reg:
              items:
                maximum: 7

additionalProperties: false

examples:
  - |
    i2c {
        #address-cells = <1>;
        #size-cells = <0>;

        led-controller@68 {
            compatible = "ti,tlc59116";
            reg = <0x68>;
            #address-cells = <1>;
            #size-cells = <0>;

            led@0 {
                reg = <0x0>;
                label = "wrt1900ac:amber:wan";
            };

            led@2 {
                reg = <0x2>;
                label = "wrt1900ac:white:2g";
            };

            led@9 {
                reg = <0x9>;
                label = "wrt1900ac:green:alive";
                linux,default-trigger = "heartbeat";
            };
        };
    };