diff mbox series

[v12,2/7] dt-bindings: pinctrl: sunxi: Make interrupts optional

Message ID 20220701112453.2310722-3-andre.przywara@arm.com
State New
Headers show
Series None | expand

Commit Message

Andre Przywara July 1, 2022, 11:24 a.m. UTC
The R_PIO pinctrl device on the Allwinner H616 SoC does not have an
interrupt (it features only two pins).
However the binding requires at least naming one upstream interrupt,
plus the #interrupt-cells and interrupt-controller properties.

Drop the unconditional requirement for the interrupt properties, and
make them dependent on being not this particular pinctrl device.

Signed-off-by: Andre Przywara <andre.przywara@arm.com>
---
 .../pinctrl/allwinner,sun4i-a10-pinctrl.yaml      | 15 ++++++++++++---
 1 file changed, 12 insertions(+), 3 deletions(-)

Comments

Rob Herring July 1, 2022, 8:57 p.m. UTC | #1
On Fri, 01 Jul 2022 12:24:48 +0100, Andre Przywara wrote:
> The R_PIO pinctrl device on the Allwinner H616 SoC does not have an
> interrupt (it features only two pins).
> However the binding requires at least naming one upstream interrupt,
> plus the #interrupt-cells and interrupt-controller properties.
> 
> Drop the unconditional requirement for the interrupt properties, and
> make them dependent on being not this particular pinctrl device.
> 
> Signed-off-by: Andre Przywara <andre.przywara@arm.com>
> ---
>  .../pinctrl/allwinner,sun4i-a10-pinctrl.yaml      | 15 ++++++++++++---
>  1 file changed, 12 insertions(+), 3 deletions(-)
> 

Reviewed-by: Rob Herring <robh@kernel.org>
Samuel Holland July 4, 2022, 11:55 p.m. UTC | #2
On 7/1/22 6:24 AM, Andre Przywara wrote:
> The R_PIO pinctrl device on the Allwinner H616 SoC does not have an
> interrupt (it features only two pins).
> However the binding requires at least naming one upstream interrupt,
> plus the #interrupt-cells and interrupt-controller properties.
> 
> Drop the unconditional requirement for the interrupt properties, and
> make them dependent on being not this particular pinctrl device.
> 
> Signed-off-by: Andre Przywara <andre.przywara@arm.com>

Acked-by: Samuel Holland <samuel@sholland.org>

> ---
>  .../pinctrl/allwinner,sun4i-a10-pinctrl.yaml      | 15 ++++++++++++---
>  1 file changed, 12 insertions(+), 3 deletions(-)
> 
> diff --git a/Documentation/devicetree/bindings/pinctrl/allwinner,sun4i-a10-pinctrl.yaml b/Documentation/devicetree/bindings/pinctrl/allwinner,sun4i-a10-pinctrl.yaml
> index bfce850c20351..0bd903954195b 100644
> --- a/Documentation/devicetree/bindings/pinctrl/allwinner,sun4i-a10-pinctrl.yaml
> +++ b/Documentation/devicetree/bindings/pinctrl/allwinner,sun4i-a10-pinctrl.yaml
> @@ -133,14 +133,11 @@ patternProperties:
>  
>  required:
>    - "#gpio-cells"
> -  - "#interrupt-cells"
>    - compatible
>    - reg
> -  - interrupts
>    - clocks
>    - clock-names
>    - gpio-controller
> -  - interrupt-controller
>  
>  allOf:
>    # FIXME: We should have the pin bank supplies here, but not a lot of
> @@ -148,6 +145,18 @@ allOf:
>    # warnings.
>  
>    - $ref: "pinctrl.yaml#"
> +  - if:
> +      not:
> +        properties:
> +          compatible:
> +            enum:
> +              - allwinner,sun50i-h616-r-pinctrl
> +    then:

Nit: all of the existing ifs and thens have blank lines between them.

> +      required:
> +        - "#interrupt-cells"
> +        - interrupts
> +        - interrupt-controller
> +
>    - if:
>        properties:
>          compatible:
>
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/pinctrl/allwinner,sun4i-a10-pinctrl.yaml b/Documentation/devicetree/bindings/pinctrl/allwinner,sun4i-a10-pinctrl.yaml
index bfce850c20351..0bd903954195b 100644
--- a/Documentation/devicetree/bindings/pinctrl/allwinner,sun4i-a10-pinctrl.yaml
+++ b/Documentation/devicetree/bindings/pinctrl/allwinner,sun4i-a10-pinctrl.yaml
@@ -133,14 +133,11 @@  patternProperties:
 
 required:
   - "#gpio-cells"
-  - "#interrupt-cells"
   - compatible
   - reg
-  - interrupts
   - clocks
   - clock-names
   - gpio-controller
-  - interrupt-controller
 
 allOf:
   # FIXME: We should have the pin bank supplies here, but not a lot of
@@ -148,6 +145,18 @@  allOf:
   # warnings.
 
   - $ref: "pinctrl.yaml#"
+  - if:
+      not:
+        properties:
+          compatible:
+            enum:
+              - allwinner,sun50i-h616-r-pinctrl
+    then:
+      required:
+        - "#interrupt-cells"
+        - interrupts
+        - interrupt-controller
+
   - if:
       properties:
         compatible: