Re: [PATCH 2/3] dt-bindings: pinctrl: Add EcoNet EN7528 pin controller

[email protected]
Newsgroups org.kernel.vger.linux-devicetree
Message-ID <[email protected]>
Thank you for your contribution! Sashiko AI review found 2 potential issue(s) to consider:
- [Low] Top-level `additionalProperties: false` incorrectly used instead of `unevaluatedProperties: false`, violating schema inheritance rules.
- [Low] Missing node labels for `&pinctrl`, `&chip_scu`, and `&gic` phandles in the DT binding example.
--

--- Patch [2]: [PATCH 2/3] dt-bindings: pinctrl: Add EcoNet EN7528 pin controller ---
commit 416526d5ba1573bed48e64c8f0fa2557dff04dcd
Author: Ahmed Naseef <[email protected]>

dt-bindings: pinctrl: Add EcoNet EN7528 pin controller
    
Add the binding for the pin controller found on the EcoNet EN7528 MIPS
SoC. It shares the IP with the Airoha pin controllers, but its IOMUX and
pin configuration registers have a different layout, so it gets its own
compatible.

> diff --git a/Documentation/devicetree/bindings/pinctrl/econet,en7528-pinctrl.yaml b/Documentation/devicetree/bindings/pinctrl/econet,en7528-pinctrl.yaml
> new file mode 100644
> index 0000000000000..574285939c9d6
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/pinctrl/econet,en7528-pinctrl.yaml
> @@ -0,0 +1,190 @@
> +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/pinctrl/econet,en7528-pinctrl.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: EcoNet EN7528 Pin Controller

[ ... ]

> +allOf:
> +  - $ref: pinctrl.yaml#
> +
> +required:
> +  - compatible

[ ... ]

> +        required:
> +          - pins
> +
> +        additionalProperties: false
> +
> +    additionalProperties: false
> +
> +additionalProperties: false
> +

[Severity: Low]
Does this prevent the use of common pinctrl properties? Since this schema
includes a reference to pinctrl.yaml# earlier in the file, using
additionalProperties: false at the top level will incorrectly reject valid
properties inherited from the referenced schema.

Should this be unevaluatedProperties: false instead?

> +examples:
> +  - |
> +    #include <dt-bindings/interrupt-controller/mips-gic.h>
> +    #include <dt-bindings/interrupt-controller/irq.h>
> +
> +    pinctrl {
> +      compatible = "econet,en7528-pinctrl";
> +
> +      airoha,chip-scu = <&chip_scu>;
> +
> +      interrupt-parent = <&gic>;
> +      interrupts = <GIC_SHARED 10 IRQ_TYPE_LEVEL_HIGH>;
> +
> +      gpio-controller;
> +      #gpio-cells = <2>;
> +
> +      interrupt-controller;
> +      #interrupt-cells = <2>;
> +
> +      gpio-ranges = <&pinctrl 0 0 42>;

[Severity: Low]
Will this example fail dt_binding_check compilation due to missing labels?
The phandles &chip_scu, &gic, and &pinctrl are referenced here, but they
are not defined as labels within the example snippet.

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=2
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.