Skip to content

Commit 346e704

Browse files
nxpfranklilag-linaro
authored andcommitted
dt-bindings: leds: Convert leds-tlc591xx.txt to yaml format
Convert binding doc leds-tlc591xx.txt to yaml format to fix below DTB_CHECK warning. arch/arm64/boot/dts/freescale/imx8mp-aristainetos3-proton2s.dtb: /soc@0/bus@30800000/i2c@30a30000/tlc59108@40: failed to match any schema with compatible: ['ti,tlc59108'] Additional change: - ref to common.yaml for child nodes. - limit child's reg to 0 - 7 for ti,tlc59108. - fix typo 'linux,default_trigger' in example. - change child node name's prefix to led-. - change nodename to led-controller. - fix properties order in example. Signed-off-by: Frank Li <[email protected]> Reviewed-by: Rob Herring (Arm) <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Lee Jones <[email protected]>
1 parent 8168906 commit 346e704

File tree

2 files changed

+90
-40
lines changed

2 files changed

+90
-40
lines changed

Documentation/devicetree/bindings/leds/leds-tlc591xx.txt

Lines changed: 0 additions & 40 deletions
This file was deleted.
Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2+
%YAML 1.2
3+
---
4+
$id: http://devicetree.org/schemas/leds/ti,tlc59116.yaml#
5+
$schema: http://devicetree.org/meta-schemas/core.yaml#
6+
7+
title: LEDs connected to tlc59116 or tlc59108
8+
9+
maintainers:
10+
- Andrew Lunn <[email protected]>
11+
12+
properties:
13+
compatible:
14+
enum:
15+
- ti,tlc59108
16+
- ti,tlc59116
17+
18+
reg:
19+
maxItems: 1
20+
21+
"#address-cells":
22+
const: 1
23+
24+
"#size-cells":
25+
const: 0
26+
27+
patternProperties:
28+
"^led@[0-9a-f]$":
29+
type: object
30+
$ref: common.yaml#
31+
properties:
32+
reg:
33+
items:
34+
minimum: 0
35+
maximum: 15
36+
37+
unevaluatedProperties: false
38+
39+
required:
40+
- compatible
41+
- reg
42+
- "#address-cells"
43+
- "#size-cells"
44+
45+
allOf:
46+
- if:
47+
properties:
48+
compatible:
49+
contains:
50+
const: ti,tlc59108
51+
then:
52+
patternProperties:
53+
"^led@[0-9a-f]$":
54+
properties:
55+
reg:
56+
items:
57+
maximum: 7
58+
59+
additionalProperties: false
60+
61+
examples:
62+
- |
63+
i2c {
64+
#address-cells = <1>;
65+
#size-cells = <0>;
66+
67+
led-controller@68 {
68+
compatible = "ti,tlc59116";
69+
reg = <0x68>;
70+
#address-cells = <1>;
71+
#size-cells = <0>;
72+
73+
led@0 {
74+
reg = <0x0>;
75+
label = "wrt1900ac:amber:wan";
76+
};
77+
78+
led@2 {
79+
reg = <0x2>;
80+
label = "wrt1900ac:white:2g";
81+
};
82+
83+
led@9 {
84+
reg = <0x9>;
85+
label = "wrt1900ac:green:alive";
86+
linux,default-trigger = "heartbeat";
87+
};
88+
};
89+
};
90+

0 commit comments

Comments
 (0)