Devicetree
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Alban Bedel" <alban.bedel@lht.dlh.de>
Cc: conor+dt@kernel.org, devicetree@vger.kernel.org, robh@kernel.org
Subject: Re: [PATCH 1/2] dt-bindings: gpio: Add CAT9532 GPIO
Date: Tue, 15 Sep 2026 09:30:04 +0000	[thread overview]
Message-ID: <20260915093005.84D891F000FF@smtp.kernel.org> (raw)
In-Reply-To: <20260915092046.931449-2-alban.bedel@lht.dlh.de>

Thank you for your contribution! Sashiko AI review found 2 potential issue(s) to consider:
- [Medium] dt-bindings: gpio: fragmenting LED dimmer binding by isolating CAT9532 as pure GPIO
- [Low] dt-bindings: gpio: redundant ngpios requirement for fixed-pin hardware
--

commit 5e8f0055659d78276b37db0fd1e766db66fdb2f8
Author: Alban Bedel <alban.bedel@lht.dlh.de>

dt-bindings: gpio: Add CAT9532 GPIO

This commit adds a devicetree binding document for the CAT9532 LED dimmer
as a GPIO controller.

> diff --git a/Documentation/devicetree/bindings/gpio/onnn,cat9532.yaml b/Documentation/devicetree/bindings/gpio/onnn,cat9532.yaml
> new file mode 100644
> index 0000000000000..6f3e3d0f4f29b
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/gpio/onnn,cat9532.yaml
> @@ -0,0 +1,52 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/gpio/onnn,cat9532.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: On Semiconductor CAT9532 LED dimmer as GPIO controller

[Severity: Medium]
The title explicitly acknowledges the hardware is an LED dimmer, but does
this binding intentionally strip away all LED functionality by isolating it
in the GPIO subsystem?

The ON Semiconductor CAT9532 is functionally identical to the NXP PCA9532
LED dimmer. A comprehensive binding for this hardware family already exists
in Documentation/devicetree/bindings/leds/nxp,pca953x.yaml, fully supporting
both its LED and GPIO capabilities.

Could the onnn,cat9532 compatible instead be integrated into the existing
nxp,pca953x.yaml binding to avoid fragmenting the devicetree representation
of the hardware?

[ ... ]

> +required:
> +  - compatible
> +  - reg
> +  - gpio-controller
> +  - "#gpio-cells"
> +  - ngpios

[Severity: Low]
Does this erroneously force ngpios to be provided in all devicetree nodes
using this binding, despite the pin count being fixed?

The CAT9532 hardware inherently possesses exactly 16 pins, and the driver
implemented in the follow-up patch completely ignores the ngpios property
from devicetree, instead hardcoding chip->ngpio = 16. Making ngpios a
required property forces devicetree authors to specify redundant, fixed
hardware parameters.

Could this redundant requirement be removed?

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260915092046.931449-1-alban.bedel@lht.dlh.de?part=1

  reply	other threads:[~2026-09-15  9:30 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-15  9:20 [PATCH 0/2] Support ON Semi CAT9532 Alban Bedel
2026-09-15  9:20 ` [PATCH 1/2] dt-bindings: gpio: Add CAT9532 GPIO Alban Bedel
2026-09-15  9:30   ` sashiko-bot [this message]
2026-09-15  9:43   ` Linus Walleij
2026-09-15  9:47   ` Linus Walleij
2026-09-15 16:42   ` Conor Dooley
2026-09-15  9:20 ` [PATCH 2/2] gpio: Support ON Semi CAT9532 Alban Bedel
2026-09-15  9:31   ` sashiko-bot
2026-09-15  9:51   ` Bartosz Golaszewski
2026-09-15  9:57     ` Bartosz Golaszewski
2026-09-15 13:48       ` Alban Bedel
2026-09-16  9:07         ` Bartosz Golaszewski
2026-09-15  9:59   ` Linus Walleij

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=20260915093005.84D891F000FF@smtp.kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=alban.bedel@lht.dlh.de \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@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