dt-bindings: leds: sc2731-bltc: Convert to YAML
Convert the Spreadtrum SC2731 breathing light controller bindings to DT schema. Adjust filename to match compatible. Signed-off-by: Stanislav Jakubek <stano.jakubek@gmail.com> Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://lore.kernel.org/r/ZpKM3yYKJixnRabP@standask-GA-A55M-S2HP Signed-off-by: Lee Jones <lee@kernel.org>
This commit is contained in:
parent
68d6520d2e
commit
29357f8a8c
@ -1,43 +0,0 @@
|
||||
LEDs connected to Spreadtrum SC27XX PMIC breathing light controller
|
||||
|
||||
The SC27xx breathing light controller supports to 3 outputs:
|
||||
red LED, green LED and blue LED. Each LED can work at normal
|
||||
PWM mode or breath light mode.
|
||||
|
||||
Required properties:
|
||||
- compatible: Should be "sprd,sc2731-bltc".
|
||||
- #address-cells: Must be 1.
|
||||
- #size-cells: Must be 0.
|
||||
- reg: Specify the controller address.
|
||||
|
||||
Required child properties:
|
||||
- reg: Port this LED is connected to.
|
||||
|
||||
Optional child properties:
|
||||
- function: See Documentation/devicetree/bindings/leds/common.txt.
|
||||
- color: See Documentation/devicetree/bindings/leds/common.txt.
|
||||
- label: See Documentation/devicetree/bindings/leds/common.txt (deprecated).
|
||||
|
||||
Examples:
|
||||
|
||||
led-controller@200 {
|
||||
compatible = "sprd,sc2731-bltc";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
reg = <0x200>;
|
||||
|
||||
led@0 {
|
||||
color = <LED_COLOR_ID_RED>;
|
||||
reg = <0x0>;
|
||||
};
|
||||
|
||||
led@1 {
|
||||
color = <LED_COLOR_ID_GREEN>;
|
||||
reg = <0x1>;
|
||||
};
|
||||
|
||||
led@2 {
|
||||
color = <LED_COLOR_ID_BLUE>;
|
||||
reg = <0x2>;
|
||||
};
|
||||
};
|
84
Documentation/devicetree/bindings/leds/sprd,sc2731-bltc.yaml
Normal file
84
Documentation/devicetree/bindings/leds/sprd,sc2731-bltc.yaml
Normal file
@ -0,0 +1,84 @@
|
||||
# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
|
||||
%YAML 1.2
|
||||
---
|
||||
$id: http://devicetree.org/schemas/leds/sprd,sc2731-bltc.yaml#
|
||||
$schema: http://devicetree.org/meta-schemas/core.yaml#
|
||||
|
||||
title: Spreadtrum SC2731 PMIC breathing light controller
|
||||
|
||||
maintainers:
|
||||
- Orson Zhai <orsonzhai@gmail.com>
|
||||
- Baolin Wang <baolin.wang7@gmail.com>
|
||||
- Chunyan Zhang <zhang.lyra@gmail.com>
|
||||
|
||||
description: |
|
||||
The SC2731 breathing light controller supports up to 3 outputs:
|
||||
red LED, green LED and blue LED. Each LED can work at normal PWM mode
|
||||
or breath light mode.
|
||||
|
||||
properties:
|
||||
compatible:
|
||||
const: sprd,sc2731-bltc
|
||||
|
||||
reg:
|
||||
maxItems: 1
|
||||
|
||||
'#address-cells':
|
||||
const: 1
|
||||
|
||||
'#size-cells':
|
||||
const: 0
|
||||
|
||||
patternProperties:
|
||||
"^led@[0-2]$":
|
||||
type: object
|
||||
$ref: common.yaml#
|
||||
unevaluatedProperties: false
|
||||
|
||||
properties:
|
||||
reg:
|
||||
minimum: 0
|
||||
maximum: 2
|
||||
|
||||
required:
|
||||
- reg
|
||||
|
||||
required:
|
||||
- compatible
|
||||
- reg
|
||||
- '#address-cells'
|
||||
- '#size-cells'
|
||||
|
||||
additionalProperties: false
|
||||
|
||||
examples:
|
||||
- |
|
||||
#include <dt-bindings/leds/common.h>
|
||||
|
||||
pmic {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
|
||||
led-controller@200 {
|
||||
compatible = "sprd,sc2731-bltc";
|
||||
reg = <0x200>;
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
|
||||
led@0 {
|
||||
reg = <0x0>;
|
||||
color = <LED_COLOR_ID_RED>;
|
||||
};
|
||||
|
||||
led@1 {
|
||||
reg = <0x1>;
|
||||
color = <LED_COLOR_ID_GREEN>;
|
||||
};
|
||||
|
||||
led@2 {
|
||||
reg = <0x2>;
|
||||
color = <LED_COLOR_ID_BLUE>;
|
||||
};
|
||||
};
|
||||
};
|
||||
...
|
Loading…
Reference in New Issue
Block a user