Devicetree
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Markus Probst" <markus.probst@posteo.de>
Cc: linux-leds@vger.kernel.org, devicetree@vger.kernel.org,
	robh@kernel.org, conor+dt@kernel.org, lee@kernel.org,
	ojeda@kernel.org, gary@garyguo.net
Subject: Re: [PATCH v2 1/4] dt-bindings: leds: Add synology disk led controller
Date: Fri, 04 Dec 2026 12:35:43 +0000	[thread overview]
Message-ID: <sashiko-outbox-249813@kernel.org> (raw)
In-Reply-To: <20261204-synology_disk_leds-v2-1-12815785ff8b@posteo.de>

Thank you for your contribution! Sashiko AI review found 3 potential
issues to consider:
- [Medium] dt-bindings: leds: disk-[0-9]+ pattern conflicts with
  multicolor schema
- [Low] dt-bindings: leds: sub-LED schema redefines color instead of
  common.yaml
- [Low] dt-bindings: leds: compatible string synology,disk-leds is
  overly generic
--

commit 8267366bd846e6cdfc61f3502ed024437f23e40c
Author: Markus Probst <markus.probst@posteo.de>

dt-bindings: leds: Add synology disk led controller

This commit adds a Devicetree binding schema for the Synology ATmega1608
I2C disk LED controller.

> diff --git a/Documentation/devicetree/bindings/leds/synology,disk-leds.yaml b/Documentation/devicetree/bindings/leds/synology,disk-leds.yaml
> new file mode 100644
> index 0000000000000..2c2e1e35c265b
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/leds/synology,disk-leds.yaml
> @@ -0,0 +1,151 @@

[ ... ]

> +properties:
> +  compatible:
> +    const: synology,disk-leds

[Severity: Low]
Is synology,disk-leds too generic for a compatible string?

Other Synology models already use different disk LED hardware, so an
unqualified compatible risks ABI collisions across hardware generations
or ATmega1608 firmware variants.  Should this identify a specific model
or controller implementation (like cznic,turris-omnia-leds)?

> +
> +  reg:
> +    maxItems: 1
> +
> +patternProperties:
> +  "^disk-[0-9]+$":
> +    type: object
> +    $ref: leds-class-multicolor.yaml#
> +    unevaluatedProperties: false

[Severity: Medium]
Does the "^disk-[0-9]+$" node name pattern conflict with
leds-class-multicolor.yaml#?

leds-class-multicolor.yaml# requires $nodename to match
"^multi-led(@[0-9a-f]|-[0-9]+)?$".  Because the two patterns are
disjoint and the controller sets additionalProperties: false, make
dt_binding_check fails on the examples and no DTS node can validate.

Renaming the pattern and example nodes to match "^multi-led-[0-9]+$"
would satisfy the multicolor schema, since function and
function-enumerator already identify the disk slot.

[ ... ]

> +    patternProperties:
> +      "^led@[0-9a-f]+$":
> +        type: object
> +        additionalProperties: false
> +
> +        properties:
> +          reg:
> +            description: Index of the LED.
> +            minimum: 0
> +            maximum: 23
> +
> +          color:
> +            description: Color of the LED.
> +            $ref: /schemas/types.yaml#/definitions/uint32
> +            minimum: 0
> +            maximum: 14

[Severity: Low]
Can "^led@[0-9a-f]+$" reference common.yaml# with unevaluatedProperties:
false instead of redefining color inline?

Hardcoding color with maximum: 14 duplicates common.yaml and will drift
when new LED_COLOR_ID_* values are added.  Setting additionalProperties:
false also prevents boards from specifying standard multicolor sub-LED
properties from common.yaml such as default-intensity.

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261204-synology_disk_leds-v2-0-12815785ff8b@posteo.de?part=1

  reply	other threads:[~2026-12-04 12:35 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-12-04 12:21 [PATCH v2 0/4] leds: Add driver for disk leds in synology devices Markus Probst
2026-12-04 12:21 ` [PATCH v2 1/4] dt-bindings: leds: Add synology disk led controller Markus Probst
2026-12-04 12:35   ` sashiko-bot [this message]
2026-12-04 12:21 ` [PATCH v2 2/4] rust: io: Add `RegisterArrayLoc::index` Markus Probst
2026-12-04 12:30   ` sashiko-bot
2026-12-04 12:21 ` [PATCH v2 3/4] rust: io: Implement Copy for RegisterArrayLoc Markus Probst
2026-12-04 12:33   ` sashiko-bot
2026-12-04 13:38   ` Gary Guo
2026-12-04 13:42     ` Markus Probst
2026-12-04 12:22 ` [PATCH v2 4/4] leds: Add driver for disk leds in synology devices Markus Probst
2026-12-04 13:32   ` sashiko-bot
2026-12-04 16:54     ` Markus Probst

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=sashiko-outbox-249813@kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=gary@garyguo.net \
    --cc=lee@kernel.org \
    --cc=linux-leds@vger.kernel.org \
    --cc=markus.probst@posteo.de \
    --cc=ojeda@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