Devicetree
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Edelweise Escala" <edelweise.escala@analog.com>
Cc: devicetree@vger.kernel.org, robh@kernel.org, conor+dt@kernel.org
Subject: Re: [PATCH v8 1/2] dt-bindings: leds: Add LTC3220 18 channel LED Driver
Date: Tue, 19 May 2026 01:23:06 +0000	[thread overview]
Message-ID: <20260519012307.5FDF6C2BCB7@smtp.kernel.org> (raw)
In-Reply-To: <20260519-ltc3220-driver-v8-1-e1771c1733f7@analog.com>

Thank you for your contribution! Sashiko AI review found 2 potential issue(s) to consider:
- [Low] `#address-cells` and `#size-cells` are omitted from the top-level `required` list.
- [Low] The schema fails to programmatically enforce the constraint that `reg` must be 1 when `led-sources` is used.
--

commit 7595dbcc690fee63863037049c154e7a47df9973
Author: Edelweise Escala <edelweise.escala@analog.com>

dt-bindings: leds: Add LTC3220 18 channel LED Driver

This commit introduces the device tree binding for the Analog Devices LTC3220,
a multi-display LED driver with an I2C interface. It defines properties for
both individual and aggregated LED control.

> diff --git a/Documentation/devicetree/bindings/leds/adi,ltc3220.yaml b/Documentation/devicetree/bindings/leds/adi,ltc3220.yaml
> new file mode 100644
> index 0000000000000..9e545442f3d9d
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/leds/adi,ltc3220.yaml
[ ... ]
> patternProperties:
>   '^led@([1-9a-f]|1[0-2])$':
>     type: object
>     $ref: /schemas/leds/common.yaml#
>     unevaluatedProperties: false
>     properties:
>       reg:
>         description:
>           Output channel for the LED (1-18 maps to LED outputs D1-D18).
>           Unit-address must be in hexadecimal (1-12 hex = 1-18 decimal).
>           For aggregated LED control, define only one LED node with reg = <1>
>           and use led-sources to list all controlled outputs. Only reg 1 should
>           be present when using led-sources.
>         minimum: 1
>         maximum: 18
> 
>     required:
>       - reg

The description notes that only reg = <1> should be present when using
led-sources, but the schema doesn't appear to programmatically enforce this.

Would it make sense to add an if/then block or dependencies rule to enforce
that reg must be 1 when led-sources is present, so that invalid configurations
do not silently pass schema validation?

[ ... ]
> required:
>   - compatible
>   - reg

Since the schema defines child nodes with reg properties, does the top-level
node need to include #address-cells and #size-cells in this required list?

While dtc might issue warnings for missing cell properties, omitting them
from the schema's required list might leave the DT schema validation
incomplete for the container node.

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260519-ltc3220-driver-v8-0-e1771c1733f7@analog.com?part=1

  reply	other threads:[~2026-05-19  1:23 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-19  1:14 [PATCH v8 0/2] Add Support for LTC3220 18 Channel LED Driver Edelweise Escala
2026-05-19  1:14 ` [PATCH v8 1/2] dt-bindings: leds: Add LTC3220 18 channel " Edelweise Escala
2026-05-19  1:23   ` sashiko-bot [this message]
2026-05-19 17:38     ` Conor Dooley
2026-05-19  1:14 ` [PATCH v8 2/2] leds: ltc3220: Add Support for " Edelweise Escala
2026-05-19  1:50   ` sashiko-bot

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=20260519012307.5FDF6C2BCB7@smtp.kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=edelweise.escala@analog.com \
    --cc=robh@kernel.org \
    --cc=sashiko-reviews@lists.linux.dev \
    /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