All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jean-Jacques Hiblot <jjhiblot@traphandler.com>
To: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>,
	Pavel Machek <pavel@ucw.cz>, Rob Herring <robh+dt@kernel.org>,
	Krzysztof Kozlowski <krzk+dt@kernel.org>
Cc: <linux-leds@vger.kernel.org>, <devicetree@vger.kernel.org>,
	<linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 1/3] dt-bindings: leds: Add bindings for the TLC5925 controller
Date: Mon, 23 May 2022 15:07:13 +0200	[thread overview]
Message-ID: <eb043379-bb33-096a-d7b0-f333d00554dd@traphandler.com> (raw)
In-Reply-To: <d12a0afc-c040-5615-fc0d-70a5c29bbf0a@linaro.org>


On 23/05/2022 12:14, Krzysztof Kozlowski wrote:
> On 23/05/2022 10:49, Jean-Jacques Hiblot wrote:
>> Add bindings documentation for the TLC5925 LED controller.
>>
>> Signed-off-by: Jean-Jacques Hiblot <jjhiblot@traphandler.com>
> Thank you for your patch. There is something to discuss/improve.

Thanks for the review. I didn't know about dt_binding_check.

I'll make sure it passes next time.

JJ

>> ---
>> devicetree@vger.kernel.org
>>   .../bindings/leds/leds-tlc5925.yaml           | 100 ++++++++++++++++++
>>   1 file changed, 100 insertions(+)
>>   create mode 100644 Documentation/devicetree/bindings/leds/leds-tlc5925.yaml
>>
>> diff --git a/Documentation/devicetree/bindings/leds/leds-tlc5925.yaml b/Documentation/devicetree/bindings/leds/leds-tlc5925.yaml
>> new file mode 100644
>> index 000000000000..156db599d5a1
>> --- /dev/null
>> +++ b/Documentation/devicetree/bindings/leds/leds-tlc5925.yaml
> Filename: vendor,device
> so "ti,tlc5925-leds.yaml" for example.
>
>
>
>> @@ -0,0 +1,100 @@
>> +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
>> +%YAML 1.2
>> +---
>> +$id: http://devicetree.org/schemas/leds/leds-tlc5925.yaml#
>> +$schema: http://devicetree.org/meta-schemas/core.yaml#
>> +
>> +title: LEDs connected to TI TLC5925 controller
>> +
>> +maintainers:
>> +  - Jean-Jacques Hiblot <jjhiblot@traphandler.com>
>> +
>> +description: |
>> +  The TLC5925 is a low-power 16-channel constant-current LED sink driver.
>> +  It is controlled through a SPI interface.
>> +  It is built around a shift register and latches which convert serial
>> +  input data into a parallel output. Several TLC5925 can be chained to
>> +  control more than 16 LEDs with a single chip-select.
>> +  The brightness level cannot be controlled, each LED is either on or off.
>> +
>> +  Each LED is represented as a sub-node of the ti,tlc5925 device.
>> +
>> +properties:
>> +  compatible:
>> +    const: ti,tlc5925
>> +
>> +  shift_register_length:
>> +    maxItems: 1
> No...
> 1. Did you test your bindings with dt_binding_check? This fails
> obviously... please, do not send untested bindings.
>
> 2. vendor prefix, no underscores, proper type, maxItems look wrong here
>
>> +    description: |
>> +      The length of the shift register. If several TLC5925 are chained,
>> +      shift_register_length should be set to 16 times the number of TLC5925.
>> +      The value must be a multiple of 8.
>> +
>> +  "#address-cells":
>> +    const: 1
>> +
>> +  "#size-cells":
>> +    const: 0
>> +
>> +  output-enable-b-gpios:
>> +    description: |
>> +      GPIO pins to enable/disable the parallel output. They describe the GPIOs
>> +      connected to the OE/ pin of the TLC5925s.
> maxItems
>
>
>> +
>> +patternProperties:
>> +  "@[a-f0-9]+$":
> How many LEDs you can have here? Usually it is limited, so the pattern
> should be narrowed.
>
>> +    type: object
>> +
>> +    $ref: common.yaml#
>> +
>> +    properties:
>> +      reg:
>> +        items:
> Not correct syntax... I will stop reviewing. There is no point to use
> reviewers time to do the job of a tool.
>
>
>> +examples:
>> +  - |
>> +    &spi0 {
>> +        leds@2 {
>> +                compatible = "ti,tlc5925";
> Messed up indentation. 4 spaces for DTS example.
>
>> +                reg = <0x02>;
>> +                spi-max-frequency = <30000000>;
>> +                shift_register_length = <32>;
>> +                output-enable-b-gpios = <&gpio0b 9 GPIO_ACTIVE_HIGH>, <&gpio0b 7 GPIO_ACTIVE_HIGH>;
>> +                #address-cells = <1>;
>> +                #size-cells = <0>;
>> +
>> +                led-satus@0 {
>> +                        reg = <0>;
>> +                        function = LED_FUNCTION_STATUS;
>> +                        color = <LED_COLOR_ID_GREEN>;
>> +                };
>> +
>> +                led-satus@4 {
>> +                        reg = <4>;
>> +                        function = LED_FUNCTION_STATUS;
>> +                        color = <LED_COLOR_ID_RED>;
>> +                };
>> +
>> +                led-alive@24 {
>> +                        reg = <24>;
>> +                        label = "green:alive"
>> +                };
>> +
>> +                led-panic@31 {
>> +                        reg = <31>;
>> +                        label = "red:panic"
>> +                };
>> +        };
>> +    };
>
> Best regards,
> Krzysztof

  reply	other threads:[~2022-05-23 13:07 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20220523084958.2723943-1-jjhiblot@traphandler.com>
2022-05-23  8:49 ` [PATCH 1/3] dt-bindings: leds: Add bindings for the TLC5925 controller Jean-Jacques Hiblot
2022-05-23 10:14   ` Krzysztof Kozlowski
2022-05-23 13:07     ` Jean-Jacques Hiblot [this message]
2022-05-23 15:16     ` Jean-Jacques Hiblot
2022-05-23 15:30       ` Krzysztof Kozlowski
2022-05-23 15:37         ` Jean-Jacques Hiblot
2022-05-23 15:39           ` Krzysztof Kozlowski
2022-05-23 12:33   ` Rob Herring
2022-05-23 20:05   ` Pavel Machek
2022-05-23  8:49 ` [PATCH 2/3] leds: Add driver for the TLC5925 LED controller Jean-Jacques Hiblot
2022-05-23  8:49 ` [PATCH 3/3] leds: tlc5925: Add support for non blocking operations Jean-Jacques Hiblot

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=eb043379-bb33-096a-d7b0-f333d00554dd@traphandler.com \
    --to=jjhiblot@traphandler.com \
    --cc=devicetree@vger.kernel.org \
    --cc=krzk+dt@kernel.org \
    --cc=krzysztof.kozlowski@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-leds@vger.kernel.org \
    --cc=pavel@ucw.cz \
    --cc=robh+dt@kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.