mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-12-22 10:34:55 +08:00
086e9074f5
Another round of 'allOf' removals that came in this cycle. json-schema versions draft7 and earlier have a weird behavior in that any keywords combined with a '$ref' are ignored (silently). The correct form was to put a '$ref' under an 'allOf'. This behavior is now changed in the 2019-09 json-schema spec and '$ref' can be mixed with other keywords. The json-schema library doesn't yet support this, but the tooling now does a fixup for this and either way works. This has been a constant source of review comments, so let's change this treewide so everyone copies the simpler syntax. Signed-off-by: Rob Herring <robh@kernel.org>
91 lines
1.9 KiB
YAML
91 lines
1.9 KiB
YAML
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
|
|
%YAML 1.2
|
|
---
|
|
$id: http://devicetree.org/schemas/leds/leds-aw2013.yaml#
|
|
$schema: http://devicetree.org/meta-schemas/core.yaml#
|
|
|
|
title: AWINIC AW2013 3-channel LED Driver
|
|
|
|
maintainers:
|
|
- Nikita Travkin <nikitos.tr@gmail.com>
|
|
|
|
description: |
|
|
The AW2013 is a 3-channel LED driver with I2C interface. It can control
|
|
LED brightness with PWM output.
|
|
|
|
properties:
|
|
compatible:
|
|
const: awinic,aw2013
|
|
|
|
reg:
|
|
maxItems: 1
|
|
|
|
vcc-supply:
|
|
description: Regulator providing power to the "VCC" pin.
|
|
|
|
"#address-cells":
|
|
const: 1
|
|
|
|
"#size-cells":
|
|
const: 0
|
|
|
|
patternProperties:
|
|
"^led@[0-2]$":
|
|
type: object
|
|
$ref: common.yaml#
|
|
|
|
properties:
|
|
reg:
|
|
description: Index of the LED.
|
|
minimum: 0
|
|
maximum: 2
|
|
|
|
required:
|
|
- compatible
|
|
- reg
|
|
- "#address-cells"
|
|
- "#size-cells"
|
|
|
|
additionalProperties: false
|
|
|
|
examples:
|
|
- |
|
|
#include <dt-bindings/gpio/gpio.h>
|
|
#include <dt-bindings/leds/common.h>
|
|
|
|
i2c0 {
|
|
#address-cells = <1>;
|
|
#size-cells = <0>;
|
|
|
|
led-controller@45 {
|
|
compatible = "awinic,aw2013";
|
|
reg = <0x45>;
|
|
#address-cells = <1>;
|
|
#size-cells = <0>;
|
|
|
|
vcc-supply = <&pm8916_l17>;
|
|
|
|
led@0 {
|
|
reg = <0>;
|
|
led-max-microamp = <5000>;
|
|
function = LED_FUNCTION_INDICATOR;
|
|
color = <LED_COLOR_ID_RED>;
|
|
};
|
|
|
|
led@1 {
|
|
reg = <1>;
|
|
led-max-microamp = <5000>;
|
|
function = LED_FUNCTION_INDICATOR;
|
|
color = <LED_COLOR_ID_GREEN>;
|
|
};
|
|
|
|
led@2 {
|
|
reg = <2>;
|
|
led-max-microamp = <5000>;
|
|
function = LED_FUNCTION_INDICATOR;
|
|
color = <LED_COLOR_ID_BLUE>;
|
|
};
|
|
};
|
|
};
|
|
...
|