Devicetree
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Edelweise Escala" <edelweise.escala@analog.com>
Cc: lee@kernel.org, robh@kernel.org, linux-leds@vger.kernel.org,
	devicetree@vger.kernel.org, conor+dt@kernel.org
Subject: Re: [PATCH v12 1/2] dt-bindings: leds: Add LTC3220 18 channel LED Driver
Date: Fri, 03 Jul 2026 04:35:46 +0000	[thread overview]
Message-ID: <20260703043546.926F71F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260703-ltc3220-driver-v12-1-d4f0da2985e2@analog.com>

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Medium] Invalid JSON schema constraints on the `reg` property inside `patternProperties`.
--

commit 70a03b6b56cf5d4bab2e86c90bde0b112ebfaa81
Author: Edelweise Escala <edelweise.escala@analog.com>

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

LTC3220 is a multi-display LED driver with I2C interface.
The LTC3220 provides individual brightness control (64-step),
blinking, and gradation features for up to 18 LED outputs.

> diff --git a/Documentation/devicetree/bindings/leds/adi,ltc3220.yaml b/Documentation/devicetree/bindings/leds/adi,ltc3220.yaml
> new file mode 100644
> index 0000000000000..c859490e9108e
> --- /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 = <0x1>
> +          and use led-sources to list all controlled outputs. Only reg 1 should
> +          be present when using led-sources.
> +        minimum: 1
> +        maximum: 18

[Severity: Medium]
Since the reg property is parsed by dt-schema as a uint32-matrix (an array of
arrays), do these scalar minimum and maximum constraints actually apply?

JSON Schema silently ignores numeric constraints when applied to an array,
meaning this might not provide the intended validation for the unit-address.

> +
> +    required:
> +      - reg
> +
> +    if:
> +      required:
> +        - led-sources
> +    then:
> +      properties:
> +        reg:
> +          const: 1

[Severity: Medium]
Will this const constraint fail validation against the array [[1]] during
make dt_binding_check?

Because dt-schema's automated fixups do not recursively patch constraints
inside if-then conditional blocks, this strict equality check for a scalar
integer might cause false-positive failures for device trees using the
'Aggregated LED' configuration with led-sources and reg = <0x1> (including
the example provided at the bottom of this binding).

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260703-ltc3220-driver-v12-0-d4f0da2985e2@analog.com?part=1

  reply	other threads:[~2026-07-03  4:35 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-03  4:10 [PATCH v12 0/2] Add Support for LTC3220 18 Channel LED Driver Edelweise Escala
2026-07-03  4:10 ` [PATCH v12 1/2] dt-bindings: leds: Add LTC3220 18 channel " Edelweise Escala
2026-07-03  4:35   ` sashiko-bot [this message]
2026-07-03  4:10 ` [PATCH v12 2/2] leds: ltc3220: Add Support for " Edelweise Escala
2026-07-03  4:31   ` 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=20260703043546.926F71F000E9@smtp.kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=edelweise.escala@analog.com \
    --cc=lee@kernel.org \
    --cc=linux-leds@vger.kernel.org \
    --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