devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Rob Herring <robh@kernel.org>
To: Corentin Guillevic <corentin.guillevic@smile.fr>
Cc: Pavel Machek <pavel@ucw.cz>, Lee Jones <lee@kernel.org>,
	Krzysztof Kozlowski <krzk+dt@kernel.org>,
	Conor Dooley <conor+dt@kernel.org>,
	linux-leds@vger.kernel.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/2] dt-bindings: leds: Add TI TLC5928 LED
Date: Mon, 31 Mar 2025 09:45:25 -0500	[thread overview]
Message-ID: <20250331144525.GA2729915-robh@kernel.org> (raw)
In-Reply-To: <20250326153535.158137-2-corentin.guillevic@smile.fr>

On Wed, Mar 26, 2025 at 04:35:33PM +0100, Corentin Guillevic wrote:
> Document Texas Instruments TLC5928 LED driver devicetree bindings.
> 
> Signed-off-by: Corentin Guillevic <corentin.guillevic@smile.fr>
> ---
>  .../bindings/leds/leds-tlc5928.yaml           | 212 ++++++++++++++++++
>  1 file changed, 212 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/leds/leds-tlc5928.yaml
> 
> diff --git a/Documentation/devicetree/bindings/leds/leds-tlc5928.yaml b/Documentation/devicetree/bindings/leds/leds-tlc5928.yaml
> new file mode 100644
> index 000000000000..0d857c9b1feb
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/leds/leds-tlc5928.yaml
> @@ -0,0 +1,212 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/leds/leds-tlc5928.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: LED driver for TLC5928 from Texas Instruments.
> +
> +maintainers:
> +  - Corentin Guillevic <corentin.guillevic@smile.fr>
> +
> +description: |
> +  The TLC5928 is a LED controller handling up to 16 LEDs. It can
> +  control LED on/off using a SPI-compatible interface, and has an
> +  on/off control data shift register (blank) and data latch.
> +
> +  This driver also supports the daisy-chaining of several TLC5928
> +  chips, as illustrated by the diagram below (with two controllers):
> +
> +  +--------------+           +--------------+
> +  |          SCLK|-----+---->|SCLK     BLANK|--
> +  |              |     |     |              |
> +  |  SPI     MOSI|-----|---->|MOSI  TLC5928 |
> +  | Master       |     |     |        (1)   |
> +  |          MISO|<--+ |  +--|MISO          |
> +  |              |   | |  |  |              |
> +  |      CS/LATCH|-+-|-|--|->|LATCH         |
> +  +--------------+ | | |  |  +--------------+
> +                   | | |  |  +--------------+
> +                   | | +--|->|SCLK     BLANK|--
> +                   | |    |  |              |
> +                   | |    +->|MOSI  TLC5928 |
> +                   | |       |        (2)   |
> +                   | +-------|MISO          |
> +                   |         |              |
> +                   +-------->|LATCH         |
> +                             +--------------+
> +
> +  For more product information please see the link below:
> +  https://www.ti.com/product/TLC5928/part-details/TLC5928PWPR
> +
> +properties:
> +  compatible:
> +    const: ti,tlc5928
> +
> +  "#address-cells":
> +    const: 1
> +
> +  "#size-cells":
> +    const: 0
> +
> +  reg:
> +    maxItems: 1
> +    description:
> +      SPI slave address
> +
> +  enable-gpios:
> +    description: |

Don't need '|' if no formatting.

> +      Array of GPIO specifiers, referring to the GPIO pins to enable/disable
> +      each device (active high to disable). In the daisy chain case, each
> +      GPIO has to be in the same sequence than the devices.
> +
> +  latch-gpio:

latch-gpios

-gpio is deprecated.

> +    maxItems: 1
> +    description: Latch GPIO (SPI chip select)
> +
> +patternProperties:
> +  "^spi-chip@[0-9]$":
> +    type: object
> +    unevaluatedProperties: false
> +    description: Properties for a TLC5928 controller.

I don't think this level is needed. Just encode the chip instance into 
the LED address. Either 1 cell splitting the bits or 2 cells with chip 
instance in 1st cell and LED# in the 2nd cell.

> +
> +    properties:
> +      '#address-cells':
> +        const: 1
> +
> +      '#size-cells':
> +        const: 0
> +
> +    patternProperties:
> +
> +      "^led@[0-9a-f]+$":

Don't need the '+' as the max is 'f'. That will change with the above 
though. You'll want something like '^led@[0-9a-f]+,[0-9a-f]$' with the 
chip and led numbers split.

> +        type: object
> +        $ref: common.yaml#
> +        unevaluatedProperties: false
> +        description:
> +          Properties for a single LED.

      reply	other threads:[~2025-03-31 14:45 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20250326153535.158137-1-corentin.guillevic@smile.fr>
2025-03-26 15:35 ` [PATCH 2/2] dt-bindings: leds: Add TI TLC5928 LED Corentin Guillevic
2025-03-31 14:45   ` Rob Herring [this message]

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=20250331144525.GA2729915-robh@kernel.org \
    --to=robh@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=corentin.guillevic@smile.fr \
    --cc=devicetree@vger.kernel.org \
    --cc=krzk+dt@kernel.org \
    --cc=lee@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-leds@vger.kernel.org \
    --cc=pavel@ucw.cz \
    /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).