From: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
To: Yuxi Wang <Yuxi.Wang@monolithicpower.com>,
pavel@ucw.cz, lee@kernel.org, robh+dt@kernel.org,
krzysztof.kozlowski+dt@linaro.org, conor+dt@kernel.org
Cc: linux-kernel@vger.kernel.org, linux-leds@vger.kernel.org,
devicetree@vger.kernel.org, wyx137120466@gmail.com
Subject: Re: [PATCH 1/2] dt-bindings: leds: add mps mp3326 LED
Date: Sat, 25 Nov 2023 11:44:36 +0100 [thread overview]
Message-ID: <9ec78ce2-6b2f-4c31-9746-572b5e64fe87@linaro.org> (raw)
In-Reply-To: <20231124093034.951-2-Yuxi.Wang@monolithicpower.com>
On 24/11/2023 10:30, Yuxi Wang wrote:
> Document mps mp3326 LED driver devicetree bindings.
>
> Signed-off-by: Yuxi Wang <Yuxi.Wang@monolithicpower.com>
> ---
> .../devicetree/bindings/leds/mps,mp3326.yaml | 143 ++++++++++++++++++
> 1 file changed, 143 insertions(+)
> create mode 100644 Documentation/devicetree/bindings/leds/mps,mp3326.yaml
>
> diff --git a/Documentation/devicetree/bindings/leds/mps,mp3326.yaml b/Documentation/devicetree/bindings/leds/mps,mp3326.yaml
> new file mode 100644
> index 000000000000..5f6bde46ccc8
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/leds/mps,mp3326.yaml
> @@ -0,0 +1,143 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/leds/mps,mp3326.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: MPS MP3326 RGB/White LED Driver
> +
> +maintainers:
> + - Yuxi Wang <Yuxi.Wang@monolithicpower.com>
> +
> +description: |
> + The MP3326 is a RGB/White LED driver with I2C interface.
> +
> + For more product information please see the link below:
> + https://www.monolithicpower.com/en/products/mp3326.html
> +
> +properties:
> + compatible:
> + const: mps,mp3326
> +
> + "#address-cells":
> + const: 1
> +
> + "#size-cells":
> + const: 0
> +
> + reg:
> + maxItems: 1
> +
> + multi-led:
> + type: object
Missing ref to multi-led class. Please open existing bindings with such
node and take a look how it is done there.
> + unevaluatedProperties: false
> +
> + properties:
> + "#address-cells":
> + const: 1
> +
> + "#size-cells":
> + const: 0
> +
> + color:
> + description: RGB module
Drop property
> +
> + patternProperties:
> + "^led@[0-3]$":
This says 4...
> + type: object
> + $ref: common.yaml#
> + unevaluatedProperties: false
> +
> + properties:
> + reg:
> + description: Index of the LED.
> + minimum: 1
> + maximum: 16
But this says 16.
Also reg does not match unit address. Minimum reg is 1, but unit address
is 0.
> +
> + required:
> + - reg
> + - color
> +
> + required:
> + - "#address-cells"
> + - "#size-cells"
> + - color
Drop color, it is coming with class-multicolor
> +
> +patternProperties:
> + "^led@[0-9]$":
It's even weirded. Here you have 10 leds with indices 0-9
> + type: object
> + $ref: common.yaml#
> + unevaluatedProperties: false
> +
> + properties:
> + reg:
> + description: Index of the LED.
> + minimum: 1
> + maximum: 16
bu there 16! With indices 1-16.
It's a mess.
> + required:
> + - reg
> +
> +required:
> + - compatible
> + - reg
> + - "#address-cells"
> + - "#size-cells"
> +
> +additionalProperties: false
> +
> +examples:
> + - |
> + #include <dt-bindings/leds/common.h>
> +
> + i2c {
> + #address-cells = <1>;
> + #size-cells = <0>;
> +
> + led-controller@30 {
> + #address-cells = <1>;
> + #size-cells = <0>;
> + compatible = "mps,mp3326";
> + reg = <0x30>;
> + multi-led {
> + #address-cells = <1>;
> + #size-cells = <0>;
> + color = <LED_COLOR_ID_RGB>;
> +
> + led@0 {
> + reg = <1>;
OK, you did not test it. Test your DTS before sending.
Also, messed indentation. Use 4 spaces.
Best regards,
Krzysztof
next prev parent reply other threads:[~2023-11-25 10:44 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-24 9:30 [PATCH 0/2] leds: Add a driver for MP3326 Yuxi Wang
2023-11-24 9:30 ` [PATCH 1/2] dt-bindings: leds: add mps mp3326 LED Yuxi Wang
2023-11-25 10:44 ` Krzysztof Kozlowski [this message]
2023-11-24 9:30 ` [PATCH 2/2] leds: add mp3326 driver Yuxi Wang
2023-11-24 15:42 ` kernel test robot
2023-11-25 20:00 ` kernel test robot
2023-11-25 21:05 ` kernel test robot
-- strict thread matches above, loose matches on Subject: below --
2023-11-08 3:29 [PATCH 0/2] " Yuxi Wang
2023-11-08 3:29 ` [PATCH 1/2] dt-bindings: leds: add mps mp3326 LED Yuxi Wang
2023-11-08 4:15 ` Rob Herring
2023-11-08 8:20 ` Krzysztof Kozlowski
2023-11-08 9:30 ` Yuxi (Yuxi) Wang
2023-11-08 10:42 ` Krzysztof Kozlowski
2023-10-31 6:59 Yuxi (Yuxi) Wang
2023-10-31 8:10 ` Krzysztof Kozlowski
2023-10-31 12:57 ` Rob Herring
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=9ec78ce2-6b2f-4c31-9746-572b5e64fe87@linaro.org \
--to=krzysztof.kozlowski@linaro.org \
--cc=Yuxi.Wang@monolithicpower.com \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=lee@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-leds@vger.kernel.org \
--cc=pavel@ucw.cz \
--cc=robh+dt@kernel.org \
--cc=wyx137120466@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).