* [PATCH] dt-bindings: leds: Convert leds-lt3593.txt to yaml format
@ 2026-09-22 5:00 dongsheng liu
2026-09-28 6:18 ` Krzysztof Kozlowski
0 siblings, 1 reply; 2+ messages in thread
From: dongsheng liu @ 2026-09-22 5:00 UTC (permalink / raw)
To: Lee Jones, Pavel Machek, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Daniel Mack
Cc: linux-leds, devicetree, linux-kernel
Convert binding doc leds-lt3593.txt to yaml format, so that nodes using
the "lltc,lt3593" compatible are no longer reported by dtbs_check as:
failed to match any schema with compatible: ['lltc,lt3593']
Additional change:
- reference common.yaml for the LED sub-node properties.
- require the sub-node, matching the driver's check for exactly one child.
The schema was written with the help of an LLM coding assistant, based on
the previous binding text and drivers/leds/leds-lt3593.c. It is validated
with make dt_binding_check, and against the "lltc,lt3593" node in
arch/arm/boot/dts/intel/pxa/pxa300-raumfeld-controller.dts.
Assisted-by: LLM dtschema yamllint
Signed-off-by: dongsheng liu <2509730023@qq.com>
---
.../devicetree/bindings/leds/leds-lt3593.txt | 37 -----------
.../devicetree/bindings/leds/lltc,lt3593.yaml | 62 +++++++++++++++++++
2 files changed, 62 insertions(+), 37 deletions(-)
delete mode 100644 Documentation/devicetree/bindings/leds/leds-lt3593.txt
create mode 100644 Documentation/devicetree/bindings/leds/lltc,lt3593.yaml
diff --git a/Documentation/devicetree/bindings/leds/leds-lt3593.txt b/Documentation/devicetree/bindings/leds/leds-lt3593.txt
deleted file mode 100644
index 24eccda..0000000
--- a/Documentation/devicetree/bindings/leds/leds-lt3593.txt
+++ /dev/null
@@ -1,37 +0,0 @@
-Bindings for Linear Technologies LT3593 LED controller
-
-Required properties:
-- compatible: Should be "lltc,lt3593".
-- lltc,ctrl-gpios: A handle to the GPIO that is connected to the 'CTRL'
- pin of the chip.
-
-The hardware supports only one LED. The properties of this LED are
-configured in a sub-node in the device node.
-
-Optional sub-node properties:
-- function: See Documentation/devicetree/bindings/leds/common.txt
-- color: See Documentation/devicetree/bindings/leds/common.txt
-- label: A label for the LED. If none is given, the LED will be
- named "lt3595::" (deprecated)
-- linux,default-trigger: The default trigger for the LED.
- See Documentation/devicetree/bindings/leds/common.txt
-- default-state: The initial state of the LED.
- See Documentation/devicetree/bindings/leds/common.txt
-
-If multiple chips of this type are found in a design, each one needs to
-be handled by its own device node.
-
-Example:
-
-#include <dt-bindings/leds/common.h>
-
-led-controller {
- compatible = "lltc,lt3593";
- lltc,ctrl-gpios = <&gpio 0 GPIO_ACTIVE_HIGH>;
-
- led {
- function = LED_FUNCTION_BACKLIGHT;
- color = <LED_COLOR_ID_WHITE>;
- default-state = "on";
- };
-};
diff --git a/Documentation/devicetree/bindings/leds/lltc,lt3593.yaml b/Documentation/devicetree/bindings/leds/lltc,lt3593.yaml
new file mode 100644
index 0000000..5c1801e
--- /dev/null
+++ b/Documentation/devicetree/bindings/leds/lltc,lt3593.yaml
@@ -0,0 +1,62 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/leds/lltc,lt3593.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Linear Technology LT3593 LED controller
+
+maintainers:
+ - Daniel Mack <daniel@zonque.org>
+
+description: |
+ The LT3593 is a step-up DC/DC converter designed to drive a single LED
+ string. Its output current is programmed by the number of pulses applied to
+ the CTRL pin, which also acts as the enable input.
+
+ The hardware supports only one LED. The properties of this LED are
+ configured in a sub-node in the device node. If multiple chips of this type
+ are found in a design, each one needs to be handled by its own device node.
+
+properties:
+ compatible:
+ const: lltc,lt3593
+
+ lltc,ctrl-gpios:
+ maxItems: 1
+ description:
+ A handle to the GPIO that is connected to the 'CTRL' pin of the chip.
+
+ led:
+ type: object
+ $ref: common.yaml#
+ unevaluatedProperties: false
+ description:
+ Properties of the LED driven by the controller.
+
+required:
+ - compatible
+ - lltc,ctrl-gpios
+ - led
+
+additionalProperties: false
+
+examples:
+ - |
+ #include <dt-bindings/gpio/gpio.h>
+ #include <dt-bindings/leds/common.h>
+
+ led-controller {
+ compatible = "lltc,lt3593";
+ pinctrl-names = "default";
+ pinctrl-0 = <<3593_pins>;
+ lltc,ctrl-gpios = <&gpio 17 GPIO_ACTIVE_HIGH>;
+
+ led {
+ function = LED_FUNCTION_BACKLIGHT;
+ color = <LED_COLOR_ID_WHITE>;
+ default-state = "on";
+ };
+ };
+
+...
--
2.43.0
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] dt-bindings: leds: Convert leds-lt3593.txt to yaml format
2026-09-22 5:00 [PATCH] dt-bindings: leds: Convert leds-lt3593.txt to yaml format dongsheng liu
@ 2026-09-28 6:18 ` Krzysztof Kozlowski
0 siblings, 0 replies; 2+ messages in thread
From: Krzysztof Kozlowski @ 2026-09-28 6:18 UTC (permalink / raw)
To: dongsheng liu
Cc: Lee Jones, Pavel Machek, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Daniel Mack, linux-leds, devicetree, linux-kernel
On Tue, Sep 22, 2026 at 01:00:12PM +0800, dongsheng liu wrote:
> Convert binding doc leds-lt3593.txt to yaml format, so that nodes using
> the "lltc,lt3593" compatible are no longer reported by dtbs_check as:
>
> failed to match any schema with compatible: ['lltc,lt3593']
>
> Additional change:
> - reference common.yaml for the LED sub-node properties.
> - require the sub-node, matching the driver's check for exactly one child.
>
> The schema was written with the help of an LLM coding assistant, based on
> the previous binding text and drivers/leds/leds-lt3593.c. It is validated
> with make dt_binding_check, and against the "lltc,lt3593" node in
> arch/arm/boot/dts/intel/pxa/pxa300-raumfeld-controller.dts.
Drop paragraph from commit msg.
>
> Assisted-by: LLM dtschema yamllint
And dtschema and yamllint here. These are not LLM tools.
Regardless, I discourage usage of LLM for conversion by beginners - you
learn not much and you repeat what we already did (these files were
converted with LLM by Rob). If this is part of any mentorship or GSoC
program, then it is actually forbidden in these to use LLM for
conversions.
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-09-28 6:19 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-09-22 5:00 [PATCH] dt-bindings: leds: Convert leds-lt3593.txt to yaml format dongsheng liu
2026-09-28 6:18 ` Krzysztof Kozlowski
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®