All of lore.kernel.org
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Rosen Penev" <rosenp@gmail.com>
Cc: robh@kernel.org, devicetree@vger.kernel.org, conor+dt@kernel.org
Subject: Re: [PATCH] dt-bindings: pinctrl: convert nsp-gpio binding
Date: Wed, 23 Sep 2026 19:02:03 +0000	[thread overview]
Message-ID: <20260923190203.8CADA1F00893@smtp.kernel.org> (raw)
In-Reply-To: <20260923185305.26223-1-rosenp@gmail.com>

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Medium] dt-bindings: pinctrl: brcm,nsp-gpio drops gpio-hog and forces double nesting
--

commit 25a9276749a1169691e6667beb90f7132674e886
Author: Rosen Penev <rosenp@gmail.com>

dt-bindings: pinctrl: convert nsp-gpio binding

The brcm,nsp-gpio-a compatible used by the NSP GPIO controller was
only documented in the legacy text binding, so dtbs_check reported
'failed to match any schema' for the gpio@20 node present in every
bcm958625 and related board DTS.

Convert Documentation/devicetree/bindings/pinctrl/brcm,nsp-gpio.txt
to a YAML schema and drop the text binding. Keep the existing
required and optional properties (reg, #gpio-cells, gpio-controller,
ngpios, and the optional interrupt/gpio-ranges support), including
the generic pinconf child nodes with pin bias and drive-strength.

> diff --git a/Documentation/devicetree/bindings/pinctrl/brcm,nsp-gpio.yaml b/Documentation/devicetree/bindings/pinctrl/brcm,nsp-gpio.yaml
> new file mode 100644
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/pinctrl/brcm,nsp-gpio.yaml

[ ... ]

> +patternProperties:
> +  '-pins$':
> +    type: object
> +    additionalProperties:
> +      description: Pin configuration child nodes.
> +      allOf:
> +        - $ref: pincfg-node.yaml#

[Severity: Medium]
Does this pattern property enforce a double-level nesting by treating
-pins nodes as wrapper objects where the properties are the actual pin
configuration nodes?

This breaks documented single-level dts configurations from the previous
text binding.

[ ... ]

> +        drive-strength:
> +          enum: [ 2, 4, 6, 8, 10, 12, 14, 16 ]
> +
> +      required:
> +        - pins
> +
> +additionalProperties: false

[Severity: Medium]
Does using strict additionalProperties: false without referencing core schemas
like gpio-hog or using unevaluatedProperties: false cause standard gpio-hog
nodes and root pinctrl properties to be improperly rejected?

> +
> +examples:
> +  - |
> +    #include <dt-bindings/interrupt-controller/arm-gic.h>
> +
> +    gpio@18000020 {
> +        compatible = "brcm,nsp-gpio-a";
> +        reg = <0x18000020 0x100>,
> +              <0x1803f1c4 0x1c>;

[ ... ]

> +        interrupt-controller;
> +        #interrupt-cells = <2>;
> +        interrupts = <GIC_SPI 85 IRQ_TYPE_LEVEL_HIGH>;
> +
> +        led-pins {
> +            led {
> +                pins = "gpio-1";
> +                bias-pull-up;
> +            };
> +        };
> +    };

[Severity: Medium]
Does altering the example to drop the gpio-hog node and pinctrl-0
properties, while artificially wrapping the led node, bypass schema validation
errors that would have otherwise caught the above issues?

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260923185305.26223-1-rosenp@gmail.com?part=1

      reply	other threads:[~2026-09-23 19:02 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-23 18:53 [PATCH] dt-bindings: pinctrl: convert nsp-gpio binding Rosen Penev
2026-09-23 19:02 ` sashiko-bot [this message]

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=20260923190203.8CADA1F00893@smtp.kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=robh@kernel.org \
    --cc=rosenp@gmail.com \
    --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.