All of lore.kernel.org
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Loic Poulain" <loic.poulain@oss.qualcomm.com>
Cc: conor+dt@kernel.org, devicetree@vger.kernel.org, lee@kernel.org,
	robh@kernel.org, linux-leds@vger.kernel.org
Subject: Re: [PATCH v2 1/3] dt-bindings: leds: nxp,pca963x: add multicolor LED support
Date: Wed, 01 Jul 2026 16:25:24 +0000	[thread overview]
Message-ID: <20260701162524.B4DF71F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260701-monza-leds-v2-1-c1be0b472926@oss.qualcomm.com>

Thank you for your contribution! Sashiko AI review found 2 potential issue(s) to consider:
- [Medium] The schema fails to apply hardware channel limits (`reg` maximums) to the newly added `multi-led` nodes and their nested `led` subnodes.
- [Medium] The nested `led` subnodes inside `multi-led` do not require the `color` property in the schema, which is strictly required by the driver.
--

commit 8324e8da2f8fc6d6c98d977c8dcc9ab3eb3a5fcd
Author: Loic Poulain <loic.poulain@oss.qualcomm.com>

dt-bindings: leds: nxp,pca963x: add multicolor LED support

Add support for grouping individual PCA963x channels into a multicolor
LED by introducing a multi-led@N node pattern. This is necessary to
model hardware setups where multiple PWM channels drive a single physical
RGB LED.

> diff --git a/Documentation/devicetree/bindings/leds/nxp,pca963x.yaml b/Documentation/devicetree/bindings/leds/nxp,pca963x.yaml
> index 938d0e48fe51b..04b05b8195c18 100644
> --- a/Documentation/devicetree/bindings/leds/nxp,pca963x.yaml
> +++ b/Documentation/devicetree/bindings/leds/nxp,pca963x.yaml

[ ... ]

> @@ -74,6 +74,39 @@ patternProperties:
>      required:
>        - reg
>  
> +  "^multi-led@[0-9a-f]+$":
> +    type: object
> +    $ref: leds-class-multicolor.yaml#
> +    unevaluatedProperties: false
> +
> +    properties:
> +      reg:
> +        minimum: 0

[Severity: Medium]
Does this miss the hardware maximum bounds for the reg property? 

The existing allOf conditional blocks in this schema apply a maximum limit to
the reg property of top-level led nodes based on the compatible string. However,
those conditionals do not appear to target the new multi-led nodes or their
nested led subnodes, which would allow device trees with out-of-bounds channels
to silently pass validation.

> +
> +      "#address-cells":
> +        const: 1
> +
> +      "#size-cells":
> +        const: 0
> +
> +    patternProperties:
> +      "^led@[0-9a-f]+$":
> +        type: object
> +        $ref: common.yaml#
> +        unevaluatedProperties: false
> +
> +        properties:
> +          reg:
> +            minimum: 0
> +
> +        required:
> +          - reg

[Severity: Medium]
Should color be included in this required list? 

If the driver unconditionally returns an error when the color property is
missing for nested sub-LEDs, omitting it from the required list here allows
incomplete device trees to pass schema validation but fail later at runtime.

> +
> +    required:
> +      - reg
> +      - "#address-cells"
> +      - "#size-cells"
> +

[ ... ]

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260701-monza-leds-v2-0-c1be0b472926@oss.qualcomm.com?part=1

  reply	other threads:[~2026-07-01 16:25 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-01 16:15 [PATCH v2 0/3] leds: pca963x: Add multicolor support and enable Monza RGB LEDs Loic Poulain
2026-07-01 16:15 ` [PATCH v2 1/3] dt-bindings: leds: nxp,pca963x: add multicolor LED support Loic Poulain
2026-07-01 16:25   ` sashiko-bot [this message]
2026-07-01 16:58   ` Conor Dooley
2026-07-06 15:42     ` Loic Poulain
2026-07-01 16:15 ` [PATCH v2 2/3] leds: pca963x: add multicolor LED class support Loic Poulain
2026-07-01 16:29   ` sashiko-bot
2026-07-09 11:35   ` Lee Jones
2026-07-10 13:37     ` Loic Poulain
2026-07-01 16:15 ` [PATCH v2 3/3] arm64: dts: monaco-arduino-monza: microcontroller LEDs Loic Poulain
2026-07-01 16:21   ` sashiko-bot
2026-07-02 14:21   ` Dmitry Baryshkov

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=20260701162524.B4DF71F000E9@smtp.kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=lee@kernel.org \
    --cc=linux-leds@vger.kernel.org \
    --cc=loic.poulain@oss.qualcomm.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 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.