mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/chenhuacai/linux-loongson
synced 2025-09-04 10:33:13 +00:00

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 <Frank.Li@nxp.com> Reviewed-by: Rob Herring (Arm) <robh@kernel.org> Link: https://lore.kernel.org/r/20250107161628.121685-1-Frank.Li@nxp.com Signed-off-by: Lee Jones <lee@kernel.org>
91 lines
1.6 KiB
YAML
91 lines
1.6 KiB
YAML
# 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";
|
|
};
|
|
};
|
|
};
|
|
|