* [PATCH] dt-bindings: leds: sc2731-bltc: convert to YAML
@ 2024-07-13 14:19 Stanislav Jakubek
2024-07-13 18:33 ` Krzysztof Kozlowski
2024-07-25 10:05 ` (subset) " Lee Jones
0 siblings, 2 replies; 3+ messages in thread
From: Stanislav Jakubek @ 2024-07-13 14:19 UTC (permalink / raw)
To: Pavel Machek, Lee Jones, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Orson Zhai, Baolin Wang, Baolin Wang, Chunyan Zhang
Cc: linux-leds, devicetree, linux-kernel
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>
---
.../bindings/leds/leds-sc27xx-bltc.txt | 43 ----------
.../bindings/leds/sprd,sc2731-bltc.yaml | 84 +++++++++++++++++++
2 files changed, 84 insertions(+), 43 deletions(-)
delete mode 100644 Documentation/devicetree/bindings/leds/leds-sc27xx-bltc.txt
create mode 100644 Documentation/devicetree/bindings/leds/sprd,sc2731-bltc.yaml
diff --git a/Documentation/devicetree/bindings/leds/leds-sc27xx-bltc.txt b/Documentation/devicetree/bindings/leds/leds-sc27xx-bltc.txt
deleted file mode 100644
index df2b4e1c492b..000000000000
--- a/Documentation/devicetree/bindings/leds/leds-sc27xx-bltc.txt
+++ /dev/null
@@ -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>;
- };
-};
diff --git a/Documentation/devicetree/bindings/leds/sprd,sc2731-bltc.yaml b/Documentation/devicetree/bindings/leds/sprd,sc2731-bltc.yaml
new file mode 100644
index 000000000000..5853410c7a45
--- /dev/null
+++ b/Documentation/devicetree/bindings/leds/sprd,sc2731-bltc.yaml
@@ -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>;
+ };
+ };
+ };
+...
--
2.34.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] dt-bindings: leds: sc2731-bltc: convert to YAML
2024-07-13 14:19 [PATCH] dt-bindings: leds: sc2731-bltc: convert to YAML Stanislav Jakubek
@ 2024-07-13 18:33 ` Krzysztof Kozlowski
2024-07-25 10:05 ` (subset) " Lee Jones
1 sibling, 0 replies; 3+ messages in thread
From: Krzysztof Kozlowski @ 2024-07-13 18:33 UTC (permalink / raw)
To: Stanislav Jakubek, Pavel Machek, Lee Jones, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Orson Zhai, Baolin Wang,
Baolin Wang, Chunyan Zhang
Cc: linux-leds, devicetree, linux-kernel
On 13/07/2024 16:19, Stanislav Jakubek wrote:
> 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>
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: (subset) [PATCH] dt-bindings: leds: sc2731-bltc: convert to YAML
2024-07-13 14:19 [PATCH] dt-bindings: leds: sc2731-bltc: convert to YAML Stanislav Jakubek
2024-07-13 18:33 ` Krzysztof Kozlowski
@ 2024-07-25 10:05 ` Lee Jones
1 sibling, 0 replies; 3+ messages in thread
From: Lee Jones @ 2024-07-25 10:05 UTC (permalink / raw)
To: Pavel Machek, Lee Jones, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Orson Zhai, Baolin Wang, Chunyan Zhang, Baolin Wang,
Stanislav Jakubek
Cc: linux-leds, devicetree, linux-kernel
On Sat, 13 Jul 2024 16:19:11 +0200, Stanislav Jakubek wrote:
> Convert the Spreadtrum SC2731 breathing light controller bindings
> to DT schema. Adjust filename to match compatible.
>
>
Applied, thanks!
[1/1] dt-bindings: leds: sc2731-bltc: convert to YAML
commit: 1b8684a0f19e2d8498501d17f2e0b590d5e4cfe8
--
Lee Jones [李琼斯]
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2024-07-25 10:05 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-07-13 14:19 [PATCH] dt-bindings: leds: sc2731-bltc: convert to YAML Stanislav Jakubek
2024-07-13 18:33 ` Krzysztof Kozlowski
2024-07-25 10:05 ` (subset) " Lee Jones
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox