Devicetree
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Sasha Finkelstein" <k@chaosmail.tech>
Cc: robh@kernel.org, conor+dt@kernel.org, devicetree@vger.kernel.org
Subject: Re: [PATCH v2 1/7] dt-bindings: spmi: apple,spmi: Add t603x
Date: Tue, 28 Jul 2026 09:33:13 +0000	[thread overview]
Message-ID: <20260728093313.C20F21F00A3F@smtp.kernel.org> (raw)
In-Reply-To: <20260728-t603x-spmi-v2-1-f43e5f10e583@chaosmail.tech>

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Medium] The binding introduces interrupt controller capabilities but fails to add `interrupt-controller` and `#interrupt-cells` to the `required` list, violating the dt-bindings subsystem guide.
--

--- Patch [1]: [PATCH v2 1/7] dt-bindings: spmi: apple,spmi: Add t603x ---
commit 3993abab519c4cf9121f6e121ee3a9b9ac214c43
Author: Sasha Finkelstein <k@chaosmail.tech>

dt-bindings: spmi: apple,spmi: Add t603x

This commit adds t603x compatibles, interrupt support, and support for
SPMI controllers that are not always-on.

> Keeping the "interrupt-controller" property as optional, as taking the
> j514c as an example, we only need this functionality on 3 out of 10
> SPMI controllers present on this SoC.

[Severity: Medium]
Device tree bindings are meant to describe hardware capabilities rather
than operating system usage.

If the hardware itself has interrupt controller capabilities, they should be
defined as required.

If only specific hardware instances possess this capability, they can be
enforced using an if/then conditional block instead of making the properties
globally optional.

Does keeping these properties optional here conflate operating system
usage with hardware capabilities?

> diff --git a/Documentation/devicetree/bindings/spmi/apple,spmi.yaml b/Documentation/devicetree/bindings/spmi/apple,spmi.yaml
> --- a/Documentation/devicetree/bindings/spmi/apple,spmi.yaml
> +++ b/Documentation/devicetree/bindings/spmi/apple,spmi.yaml

[ ... ]

> @@ -34,6 +36,18 @@ properties:
>    reg:
>      maxItems: 1
>  
> +  interrupts:
> +    maxItems: 1
> +    description: Optional, operates in polled mode if not present
> +
> +  interrupt-controller: true
> +
> +  "#interrupt-cells":
> +    const: 2
> +
> +  power-domains:
> +    maxItems: 1
> +
>  required:
>    - compatible
>    - reg

[Severity: Medium]
The device tree binding guidelines specify that when a hardware variant adds
provider capabilities, the corresponding standard properties (in this case,
interrupt-controller and #interrupt-cells) must appear in the required list
with appropriate constraints.

Leaving them optional allows incomplete device tree nodes missing these
properties to silently pass schema validation, which can lead to runtime
driver failures.

Should interrupt-controller and #interrupt-cells be added to this required
list?

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260728-t603x-spmi-v2-0-f43e5f10e583@chaosmail.tech?part=1

  reply	other threads:[~2026-07-28  9:33 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-28  9:28 [PATCH v2 0/7] spmi: apple: Additional commands and interrupt support Sasha Finkelstein
2026-07-28  9:28 ` [PATCH v2 1/7] dt-bindings: spmi: apple,spmi: Add t603x Sasha Finkelstein
2026-07-28  9:33   ` sashiko-bot [this message]
2026-07-28  9:28 ` [PATCH v2 2/7] spmi: apple: Validate FIFO state Sasha Finkelstein
2026-07-28  9:41   ` sashiko-bot
2026-07-28  9:28 ` [PATCH v2 3/7] spmi: apple: check transaction status Sasha Finkelstein
2026-07-28  9:41   ` sashiko-bot
2026-07-28  9:28 ` [PATCH v2 4/7] spmi: apple: Implement remaining commands Sasha Finkelstein
2026-07-28  9:46   ` sashiko-bot
2026-07-28  9:28 ` [PATCH v2 5/7] spmi: apple: lock around FIFOs Sasha Finkelstein
2026-07-28  9:37   ` sashiko-bot
2026-07-28  9:28 ` [PATCH v2 6/7] spmi: apple: use IRQ for RX FIFO if possible Sasha Finkelstein
2026-07-28  9:42   ` sashiko-bot
2026-07-28  9:28 ` [PATCH v2 7/7] spmi: apple: interrupt controller functionality Sasha Finkelstein
2026-07-28  9:40   ` sashiko-bot

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=20260728093313.C20F21F00A3F@smtp.kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=k@chaosmail.tech \
    --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