Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Stanislav Jakubek and committed by
Lee Jones
29357f8a 68d6520d

+84 -43
-43
Documentation/devicetree/bindings/leds/leds-sc27xx-bltc.txt
··· 1 - LEDs connected to Spreadtrum SC27XX PMIC breathing light controller 2 - 3 - The SC27xx breathing light controller supports to 3 outputs: 4 - red LED, green LED and blue LED. Each LED can work at normal 5 - PWM mode or breath light mode. 6 - 7 - Required properties: 8 - - compatible: Should be "sprd,sc2731-bltc". 9 - - #address-cells: Must be 1. 10 - - #size-cells: Must be 0. 11 - - reg: Specify the controller address. 12 - 13 - Required child properties: 14 - - reg: Port this LED is connected to. 15 - 16 - Optional child properties: 17 - - function: See Documentation/devicetree/bindings/leds/common.txt. 18 - - color: See Documentation/devicetree/bindings/leds/common.txt. 19 - - label: See Documentation/devicetree/bindings/leds/common.txt (deprecated). 20 - 21 - Examples: 22 - 23 - led-controller@200 { 24 - compatible = "sprd,sc2731-bltc"; 25 - #address-cells = <1>; 26 - #size-cells = <0>; 27 - reg = <0x200>; 28 - 29 - led@0 { 30 - color = <LED_COLOR_ID_RED>; 31 - reg = <0x0>; 32 - }; 33 - 34 - led@1 { 35 - color = <LED_COLOR_ID_GREEN>; 36 - reg = <0x1>; 37 - }; 38 - 39 - led@2 { 40 - color = <LED_COLOR_ID_BLUE>; 41 - reg = <0x2>; 42 - }; 43 - };
+84
Documentation/devicetree/bindings/leds/sprd,sc2731-bltc.yaml
··· 1 + # SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause 2 + %YAML 1.2 3 + --- 4 + $id: http://devicetree.org/schemas/leds/sprd,sc2731-bltc.yaml# 5 + $schema: http://devicetree.org/meta-schemas/core.yaml# 6 + 7 + title: Spreadtrum SC2731 PMIC breathing light controller 8 + 9 + maintainers: 10 + - Orson Zhai <orsonzhai@gmail.com> 11 + - Baolin Wang <baolin.wang7@gmail.com> 12 + - Chunyan Zhang <zhang.lyra@gmail.com> 13 + 14 + description: | 15 + The SC2731 breathing light controller supports up to 3 outputs: 16 + red LED, green LED and blue LED. Each LED can work at normal PWM mode 17 + or breath light mode. 18 + 19 + properties: 20 + compatible: 21 + const: sprd,sc2731-bltc 22 + 23 + reg: 24 + maxItems: 1 25 + 26 + '#address-cells': 27 + const: 1 28 + 29 + '#size-cells': 30 + const: 0 31 + 32 + patternProperties: 33 + "^led@[0-2]$": 34 + type: object 35 + $ref: common.yaml# 36 + unevaluatedProperties: false 37 + 38 + properties: 39 + reg: 40 + minimum: 0 41 + maximum: 2 42 + 43 + required: 44 + - reg 45 + 46 + required: 47 + - compatible 48 + - reg 49 + - '#address-cells' 50 + - '#size-cells' 51 + 52 + additionalProperties: false 53 + 54 + examples: 55 + - | 56 + #include <dt-bindings/leds/common.h> 57 + 58 + pmic { 59 + #address-cells = <1>; 60 + #size-cells = <0>; 61 + 62 + led-controller@200 { 63 + compatible = "sprd,sc2731-bltc"; 64 + reg = <0x200>; 65 + #address-cells = <1>; 66 + #size-cells = <0>; 67 + 68 + led@0 { 69 + reg = <0x0>; 70 + color = <LED_COLOR_ID_RED>; 71 + }; 72 + 73 + led@1 { 74 + reg = <0x1>; 75 + color = <LED_COLOR_ID_GREEN>; 76 + }; 77 + 78 + led@2 { 79 + reg = <0x2>; 80 + color = <LED_COLOR_ID_BLUE>; 81 + }; 82 + }; 83 + }; 84 + ...