diff mbox series

[1/2] dt-bindings: soc: imx: fsl,imx-anatop: Fix the i.MX7 irq number

Message ID 20241025004159.1571782-1-festevam@gmail.com (mailing list archive)
State New
Headers show
Series [1/2] dt-bindings: soc: imx: fsl,imx-anatop: Fix the i.MX7 irq number | expand

Commit Message

Fabio Estevam Oct. 25, 2024, 12:41 a.m. UTC
From: Fabio Estevam <festevam@denx.de>

Unlike the other i.MX devices, i.MX7 has only two anatop interrupts.

Add logic that contemplates such case to fix the following
dt-schema warning:

anatop@30360000: interrupts: [[0, 49, 4], [0, 51, 4]] is too short

Signed-off-by: Fabio Estevam <festevam@denx.de>
---
 .../bindings/soc/imx/fsl,imx-anatop.yaml       | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)

Comments

Alexander Stein Oct. 25, 2024, 10:19 a.m. UTC | #1
Hi Fabio,

thanks for the patch.

Am Freitag, 25. Oktober 2024, 02:41:58 CEST schrieb Fabio Estevam:
> From: Fabio Estevam <festevam@denx.de>
> 
> Unlike the other i.MX devices, i.MX7 has only two anatop interrupts.
> 
> Add logic that contemplates such case to fix the following
> dt-schema warning:
> 
> anatop@30360000: interrupts: [[0, 49, 4], [0, 51, 4]] is too short
> 
> Signed-off-by: Fabio Estevam <festevam@denx.de>

Reviewed-by: Alexander Stein <alexander.stein@ew.tq-group.com>

> ---
>  .../bindings/soc/imx/fsl,imx-anatop.yaml       | 18 ++++++++++++++++++
>  1 file changed, 18 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/soc/imx/fsl,imx-anatop.yaml b/Documentation/devicetree/bindings/soc/imx/fsl,imx-anatop.yaml
> index c4ae4f28422b..ae708a658d52 100644
> --- a/Documentation/devicetree/bindings/soc/imx/fsl,imx-anatop.yaml
> +++ b/Documentation/devicetree/bindings/soc/imx/fsl,imx-anatop.yaml
> @@ -36,6 +36,7 @@ properties:
>        - description: Temperature sensor event
>        - description: Brown-out event on either of the support regulators
>        - description: Brown-out event on either the core, gpu or soc regulators
> +    minItems: 2
>  
>    tempmon:
>      type: object
> @@ -52,6 +53,23 @@ required:
>    - compatible
>    - reg
>  
> +allOf:
> +  - if:
> +      properties:
> +        compatible:
> +          contains:
> +            enum:
> +              - fsl,imx7d-anatop
> +    then:
> +      properties:
> +        interrupts:
> +          maxItems: 2
> +    else:
> +      properties:
> +        interrupts:
> +          minItems: 3
> +          maxItems: 3
> +
>  additionalProperties: false
>  
>  examples:
>
Rob Herring (Arm) Oct. 27, 2024, 9:43 p.m. UTC | #2
On Thu, 24 Oct 2024 21:41:58 -0300, Fabio Estevam wrote:
> From: Fabio Estevam <festevam@denx.de>
> 
> Unlike the other i.MX devices, i.MX7 has only two anatop interrupts.
> 
> Add logic that contemplates such case to fix the following
> dt-schema warning:
> 
> anatop@30360000: interrupts: [[0, 49, 4], [0, 51, 4]] is too short
> 
> Signed-off-by: Fabio Estevam <festevam@denx.de>
> ---
>  .../bindings/soc/imx/fsl,imx-anatop.yaml       | 18 ++++++++++++++++++
>  1 file changed, 18 insertions(+)
> 

Acked-by: Rob Herring (Arm) <robh@kernel.org>
Shawn Guo Nov. 2, 2024, 3:21 a.m. UTC | #3
On Thu, Oct 24, 2024 at 09:41:58PM -0300, Fabio Estevam wrote:
> From: Fabio Estevam <festevam@denx.de>
> 
> Unlike the other i.MX devices, i.MX7 has only two anatop interrupts.
> 
> Add logic that contemplates such case to fix the following
> dt-schema warning:
> 
> anatop@30360000: interrupts: [[0, 49, 4], [0, 51, 4]] is too short
> 
> Signed-off-by: Fabio Estevam <festevam@denx.de>

Applied both, thanks!
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/soc/imx/fsl,imx-anatop.yaml b/Documentation/devicetree/bindings/soc/imx/fsl,imx-anatop.yaml
index c4ae4f28422b..ae708a658d52 100644
--- a/Documentation/devicetree/bindings/soc/imx/fsl,imx-anatop.yaml
+++ b/Documentation/devicetree/bindings/soc/imx/fsl,imx-anatop.yaml
@@ -36,6 +36,7 @@  properties:
       - description: Temperature sensor event
       - description: Brown-out event on either of the support regulators
       - description: Brown-out event on either the core, gpu or soc regulators
+    minItems: 2
 
   tempmon:
     type: object
@@ -52,6 +53,23 @@  required:
   - compatible
   - reg
 
+allOf:
+  - if:
+      properties:
+        compatible:
+          contains:
+            enum:
+              - fsl,imx7d-anatop
+    then:
+      properties:
+        interrupts:
+          maxItems: 2
+    else:
+      properties:
+        interrupts:
+          minItems: 3
+          maxItems: 3
+
 additionalProperties: false
 
 examples: