This documentation ensures proper integration of the LP5812
in Device Tree-based systems.
Signed-off-by: Nam Tran <trannamatk@gmail.com>
---
.../devicetree/bindings/leds/ti,lp5812.yaml | 34 +++++++++++++++++++
MAINTAINERS | 6 ++++
2 files changed, 40 insertions(+)
create mode 100644 Documentation/devicetree/bindings/leds/ti,lp5812.yaml
diff --git a/Documentation/devicetree/bindings/leds/ti,lp5812.yaml b/Documentation/devicetree/bindings/leds/ti,lp5812.yaml
new file mode 100644
index 000000000000..1eb395230531
--- /dev/null
+++ b/Documentation/devicetree/bindings/leds/ti,lp5812.yaml
@@ -0,0 +1,34 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+
+title: LED driver for LP5812 LED from Texas Instruments.
+
+maintainers:
+
+description: |
+ The LP5812 is an I2C LED Driver that can support LED matrix 4x3.
+
+properties:
+ compatible:
+ const: ti,lp5812
+
+ reg:
+ description: I2C slave address
+ maxItems: 1
+
+required:
+ - compatible
+ - reg
+
+additionalProperties: false
+
+examples:
+ - |
+ i2c1 {
+ lp5812@1b {
+ compatible = "ti,lp5812";
+ reg = <0x1b>;
+ };
+ };
+
+...
diff --git a/MAINTAINERS b/MAINTAINERS
index 4ff26fa94895..32312959d595 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -23494,6 +23494,12 @@ S: Maintained
F: Documentation/devicetree/bindings/leds/backlight/ti,lp8864.yaml
F: drivers/leds/leds-lp8864.c
+TEXAS INSTRUMENTS' LP5812 LED DRIVER
+M: Nam Tran <trannamatk@gmail.com>
+L: linux-leds@vger.kernel.org
+S: Maintained
+F: Documentation/devicetree/bindings/leds/ti,lp5812.yaml
+
TEXAS INSTRUMENTS' SYSTEM CONTROL INTERFACE (TISCI) PROTOCOL DRIVER
M: Nishanth Menon <nm@ti.com>
M: Tero Kristo <kristo@kernel.org>
--
2.25.1
On Wed, Feb 26, 2025 at 12:06:00AM +0700, Nam Tran wrote:
> This documentation ensures proper integration of the LP5812
> in Device Tree-based systems.
Nothing improved above.
Please read my previous comment and implement it or respond to it, if
you disagree.
A nit, subject: drop second/last, redundant "bindings". The
"dt-bindings" prefix is already stating that these are bindings.
See also:
https://elixir.bootlin.com/linux/v6.7-rc8/source/Documentation/devicetree/bindings/submitting-patches.rst#L18
>
> Signed-off-by: Nam Tran <trannamatk@gmail.com>
> ---
> .../devicetree/bindings/leds/ti,lp5812.yaml | 34 +++++++++++++++++++
> MAINTAINERS | 6 ++++
> 2 files changed, 40 insertions(+)
> create mode 100644 Documentation/devicetree/bindings/leds/ti,lp5812.yaml
>
> diff --git a/Documentation/devicetree/bindings/leds/ti,lp5812.yaml b/Documentation/devicetree/bindings/leds/ti,lp5812.yaml
> new file mode 100644
> index 000000000000..1eb395230531
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/leds/ti,lp5812.yaml
> @@ -0,0 +1,34 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +%YAML 1.2
> +
> +title: LED driver for LP5812 LED from Texas Instruments.
LED driver as Linux driver? Or LP5812 LED driver as electrical driver?
Decide, but if first then rewrite it to describe hardware.
Also drop full stop. Titles do not have full stops.
> +
> +maintainers:
> +
> +description: |
Do not need '|' unless you need to preserve formatting.
> + The LP5812 is an I2C LED Driver that can support LED matrix 4x3.
So Linux driver? Drop driver references and describe hardware.
> +
> +properties:
> + compatible:
> + const: ti,lp5812
> +
> + reg:
> + description: I2C slave address
Drop description
> + maxItems: 1
> +
> +required:
> + - compatible
> + - reg
No ref to LED common schema? No other properties? This is too
incomplete.
> +
> +additionalProperties: false
> +
> +examples:
> + - |
> + i2c1 {
i2c
> + lp5812@1b {
Node names should be generic. See also an explanation and list of
examples (not exhaustive) in DT specification:
https://devicetree-specification.readthedocs.io/en/latest/chapter2-devicetree-basics.html#generic-names-recommendation
> + compatible = "ti,lp5812";
> + reg = <0x1b>;
> + };
> + };
> +
> +...
> diff --git a/MAINTAINERS b/MAINTAINERS
> index 4ff26fa94895..32312959d595 100644
> --- a/MAINTAINERS
> +++ b/MAINTAINERS
> @@ -23494,6 +23494,12 @@ S: Maintained
> F: Documentation/devicetree/bindings/leds/backlight/ti,lp8864.yaml
> F: drivers/leds/leds-lp8864.c
>
> +TEXAS INSTRUMENTS' LP5812 LED DRIVER
5 is before 8, so this does not look sorted.
And finally, please test before posting...
Best regards,
Krzysztof
On Wed, 26 Feb 2025 00:06:00 +0700, Nam Tran wrote:
> This documentation ensures proper integration of the LP5812
> in Device Tree-based systems.
>
> Signed-off-by: Nam Tran <trannamatk@gmail.com>
> ---
> .../devicetree/bindings/leds/ti,lp5812.yaml | 34 +++++++++++++++++++
> MAINTAINERS | 6 ++++
> 2 files changed, 40 insertions(+)
> create mode 100644 Documentation/devicetree/bindings/leds/ti,lp5812.yaml
>
My bot found errors running 'make dt_binding_check' on your patch:
yamllint warnings/errors:
./Documentation/devicetree/bindings/leds/ti,lp5812.yaml:4:1: [error] syntax error: expected '<document start>', but found '<block mapping start>' (syntax)
./Documentation/devicetree/bindings/leds/ti,lp5812.yaml:6:13: [error] empty value in block mapping (empty-values)
dtschema/dtc warnings/errors:
/builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/leds/ti,lp5812.yaml: ignoring, error parsing file
./Documentation/devicetree/bindings/leds/ti,lp5812.yaml:4:1: expected '<document start>', but found ('<block mapping start>',)
make[2]: *** Deleting file 'Documentation/devicetree/bindings/leds/ti,lp5812.example.dts'
Documentation/devicetree/bindings/leds/ti,lp5812.yaml:4:1: expected '<document start>', but found ('<block mapping start>',)
make[2]: *** [Documentation/devicetree/bindings/Makefile:26: Documentation/devicetree/bindings/leds/ti,lp5812.example.dts] Error 1
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [/builds/robherring/dt-review-ci/linux/Makefile:1511: dt_binding_check] Error 2
make: *** [Makefile:251: __sub-make] Error 2
doc reference errors (make refcheckdocs):
See https://patchwork.ozlabs.org/project/devicetree-bindings/patch/20250225170601.21334-2-trannamatk@gmail.com
The base for the series is generally the latest rc1. A different dependency
should be noted in *this* patch.
If you already ran 'make dt_binding_check' and didn't see the above
error(s), then make sure 'yamllint' is installed and dt-schema is up to
date:
pip3 install dtschema --upgrade
Please check and re-submit after running the above command yourself. Note
that DT_SCHEMA_FILES can be set to your schema file to speed up checking
your schema. However, it must be unset to test all examples with your schema.
© 2016 - 2026 Red Hat, Inc.