Message ID | 20250225170601.21334-1-trannamatk@gmail.com |
---|---|
Headers | show |
Series | leds: add new LED driver for TI LP5812 | expand |
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.
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:05:59 +0700, Nam Tran wrote: > From: Nam Tran <trannamatk@gmail.com> > To: Pavel Machek <pavel@kernel.org>, Lee Jones <lee@kernel.org>, Krzysztof Kozlowski <krzk+dt@kernel.org>, Rob Herring <robh@kernel.org>, Conor Dooley <conor+dt@kernel.org> > Cc: linux-leds@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org > > This patch series adds support for the Texas Instruments LP5812 LED driver. > Patch 1 adds the Device Tree (DT) bindings documentation. > Patch 2 introduces the core driver implementation. > > The LP5812 is an I2C-controlled LED driver capable of driving up to 4 LEDs with independent brightness control and pattern programming. > This driver provides support through the Linux LED framework and includes device tree bindings for proper integration. > > This driver has been tested on Raspberry Pi 4 B using kernel version 6.14.0. > > I kindly request feedback from the community to ensure that this driver adheres to the Linux LED subsystem standards. > > Thank you for your consideration. > > Best regards, > Nam > > --- > > Changes in v2: > - Renamed DT bindings file from `leds-lp5812.yaml` to `ti,lp5812.yaml`. > - Added LP5812 device tree node to `bcm2711-rpi-4b.dts` for Raspberry Pi 4B. > - Updated core driver implementation to fix build errors in kernel version 6.14.0-rc4. (The v1 patch was only compatible with kernel version 6.1.93) > > Signed-off-by: Nam Tran <trannamatk@gmail.com> > > My bot found new DTB warnings on the .dts files added or changed in this series. Some warnings may be from an existing SoC .dtsi. Or perhaps the warnings are fixed by another series. Ultimately, it is up to the platform maintainer whether these warnings are acceptable or not. No need to reply unless the platform maintainer has comments. If you already ran DT checks and didn't see these error(s), then make sure dt-schema is up to date: pip3 install dtschema --upgrade New warnings running 'make CHECK_DTBS=y for arch/arm/boot/dts/broadcom/' for 20250225170601.21334-1-trannamatk@gmail.com: arch/arm/boot/dts/broadcom/bcm2711-rpi-400.dtb: /soc/i2c@7e804000/lp5812@1b: failed to match any schema with compatible: ['ti,lp5812'] arch/arm/boot/dts/broadcom/bcm2711-rpi-4-b.dtb: /soc/i2c@7e804000/lp5812@1b: failed to match any schema with compatible: ['ti,lp5812']