Linux LED subsystem development
 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 1/2] dt-bindings: leds: Add synology disk led controller
Date: Wed, 02 Dec 2026 15:29:35 +0000	[thread overview]
Message-ID: <sashiko-outbox-246102@kernel.org> (raw)
In-Reply-To: <20261202-synology_disk_leds-v1-1-53249fd3a2ad@posteo.de>

Thank you for your contribution! Sashiko AI review found 3 potential
issues to consider:
- [Medium] dt-bindings: leds: disk-[0-9]+ node pattern conflicts with
  multicolor schema
- [Medium] dt-bindings: leds: led@[0-9]+ pattern rejects hex unit
  addresses 0xa to 0xf
- [Low] dt-bindings: leds: sub-LED node redefines color instead of
  common.yaml ref
--

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

dt-bindings: leds: Add synology disk led controller

This commit adds a devicetree binding schema for the I2C-connected Atmega1608
disk LED controller used in Synology devices.

> 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..e9a8df77c8b42
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/leds/synology,disk-leds.yaml
> @@ -0,0 +1,151 @@

[ ... ]

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

[Severity: Medium]
Can a child node satisfy both "^disk-[0-9]+$" and leds-class-multicolor.yaml#?

Documentation/devicetree/bindings/leds/leds-class-multicolor.yaml enforces
$nodename matching "^multi-led(@[0-9a-f]|-[0-9]+)?$".  Because the two
patterns are disjoint, dt_binding_check fails on the disk-1 through disk-4
nodes in the example and rejects any node written against this binding.

> +
> +    properties:
> +      "#address-cells":
> +        const: 1
> +
> +      "#size-cells":
> +        const: 0
> +
> +    patternProperties:
> +      "^led@[0-9]+$":
> +        type: object
> +        additionalProperties: false
> +
> +        properties:
> +          reg:
> +            description: Index of the LED.
> +            minimum: 0
> +            maximum: 23

[Severity: Medium]
Does "^led@[0-9]+$" reject valid hexadecimal unit addresses for LEDs 10
through 15?

Since reg permits indices up to 23 (0x17), sub-LEDs at indices 10 through 15
must use unit addresses led@a through led@f to avoid dtc unit_address_vs_reg
warnings, which this pattern does not allow.  Should this match hex unit
addresses such as "^led@([0-9a-f]|1[0-7])$"?

> +
> +          color:
> +            description: Color of the LED.
> +            $ref: /schemas/types.yaml#/definitions/uint32
> +            minimum: 0
> +            maximum: 14

[Severity: Low]
This isn't a bug, but redefining color here with additionalProperties: false
duplicates common.yaml and prevents sub-LED nodes from using standard
properties such as default-intensity.  Could the sub-LED schema reference
common.yaml# with unevaluatedProperties: false instead?

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261202-synology_disk_leds-v1-0-53249fd3a2ad@posteo.de?part=1

  reply	other threads:[~2026-12-02 15:29 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-12-02 15:21 [PATCH 0/2] leds: add driver for disk leds in synology devices Markus Probst
2026-12-02 15:21 ` [PATCH 1/2] dt-bindings: leds: Add synology disk led controller Markus Probst
2026-12-02 15:29   ` sashiko-bot [this message]
2026-12-02 15:21 ` [PATCH 2/2] leds: add driver for disk leds in synology devices Markus Probst
2026-12-02 15:38   ` sashiko-bot
2026-12-02 15:47     ` 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-246102@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