Re: [PATCH v5 1/6] dt-bindings: spmi: apple,spmi: Add t603x and t8122

[email protected]
Newsgroups org.kernel.vger.linux-devicetree
Message-ID <[email protected]>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Medium] The dt-bindings subsystem guidelines state that when a binding adds a new provider capability like `interrupt-controller`, the corresponding required properties (`interrupt-controller` and `#interrupt-cells`) must be enforced, and the examples section must include all required properties. The patch adds `interrupt-controller` and `#interrupt-cells` but keeps them optional without a `dependencies` block to enforce `#interrupt-cells` when `interrupt-controller` is used. It also fails to include these properties in the provided examples.
--

--- Patch [1]: [PATCH v5 1/6] dt-bindings: spmi: apple,spmi: Add t603x and t8122 ---
commit 65d257979c0e4c52b73ff9a4d1d799b2a91dd019
Author: Sasha Finkelstein <[email protected]>

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

Add t603x and t8122 compatibles, interrupt support, and support for
SPMI controllers that are not always-on.

> diff --git a/Documentation/devicetree/bindings/spmi/apple,spmi.yaml b/Documentation/devicetree/bindings/spmi/apple,spmi.yaml
> index 3e5b14bc8c317..fceed47b2cd17 100644
> --- a/Documentation/devicetree/bindings/spmi/apple,spmi.yaml
> +++ b/Documentation/devicetree/bindings/spmi/apple,spmi.yaml

[ ... ]

> @@ -34,6 +37,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]
Does this schema lack a dependencies block to enforce that #interrupt-cells
is required whenever interrupt-controller is present?

Without this enforcement, could a device tree node utilizing the
interrupt-controller capability but missing #interrupt-cells silently pass
schema validation?

Additionally, should the examples section be updated to demonstrate these
new provider properties, ensuring dt_binding_check validates a fully
compliant configuration?

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=1
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.