2023-09-24 22:40:50

by Fabio Estevam

[permalink] [raw]
Subject: [PATCH 4/4] dt-bindings: crypto: fsl-imx-sahara: Fix the number of irqs

From: Fabio Estevam <[email protected]>

i.MX27 has only one Sahara interrupt. i.MX53 has two.

Describe this difference.

Signed-off-by: Fabio Estevam <[email protected]>
---
.../bindings/crypto/fsl-imx-sahara.yaml | 23 ++++++++++++++++++-
1 file changed, 22 insertions(+), 1 deletion(-)

diff --git a/Documentation/devicetree/bindings/crypto/fsl-imx-sahara.yaml b/Documentation/devicetree/bindings/crypto/fsl-imx-sahara.yaml
index 9dbfc15510a8..9d1d9c8f0955 100644
--- a/Documentation/devicetree/bindings/crypto/fsl-imx-sahara.yaml
+++ b/Documentation/devicetree/bindings/crypto/fsl-imx-sahara.yaml
@@ -19,7 +19,10 @@ properties:
maxItems: 1

interrupts:
- maxItems: 1
+ items:
+ - description: SAHARA Interrupt for Host 0
+ - description: SAHARA Interrupt for Host 1
+ minItems: 1

clocks:
items:
@@ -40,6 +43,24 @@ required:

additionalProperties: false

+allOf:
+ - if:
+ properties:
+ compatible:
+ contains:
+ enum:
+ - fsl,imx53-sahara
+ then:
+ properties:
+ interrupts:
+ minItems: 2
+ maxItems: 2
+ else:
+ properties:
+ interrupts:
+ minItems: 1
+ maxItems: 1
+
examples:
- |
#include <dt-bindings/clock/imx27-clock.h>
--
2.34.1


2023-09-26 11:11:01

by Krzysztof Kozlowski

[permalink] [raw]
Subject: Re: [PATCH 4/4] dt-bindings: crypto: fsl-imx-sahara: Fix the number of irqs

On 25/09/2023 00:31, Fabio Estevam wrote:
> From: Fabio Estevam <[email protected]>
>
> i.MX27 has only one Sahara interrupt. i.MX53 has two.
>
> Describe this difference.
>
> Signed-off-by: Fabio Estevam <[email protected]>
> ---
> .../bindings/crypto/fsl-imx-sahara.yaml | 23 ++++++++++++++++++-
> 1 file changed, 22 insertions(+), 1 deletion(-)
>
> diff --git a/Documentation/devicetree/bindings/crypto/fsl-imx-sahara.yaml b/Documentation/devicetree/bindings/crypto/fsl-imx-sahara.yaml
> index 9dbfc15510a8..9d1d9c8f0955 100644
> --- a/Documentation/devicetree/bindings/crypto/fsl-imx-sahara.yaml
> +++ b/Documentation/devicetree/bindings/crypto/fsl-imx-sahara.yaml
> @@ -19,7 +19,10 @@ properties:
> maxItems: 1
>
> interrupts:
> - maxItems: 1
> + items:
> + - description: SAHARA Interrupt for Host 0
> + - description: SAHARA Interrupt for Host 1
> + minItems: 1
>
> clocks:
> items:
> @@ -40,6 +43,24 @@ required:
>
> additionalProperties: false
>
> +allOf:

This goes before additionalProperties:.

> + - if:
> + properties:
> + compatible:
> + contains:
> + enum:
> + - fsl,imx53-sahara
> + then:
> + properties:
> + interrupts:
> + minItems: 2
> + maxItems: 2
> + else:
> + properties:
> + interrupts:
> + minItems: 1

maxItems is enough.


Reviewed-by: Krzysztof Kozlowski <[email protected]>


Best regards,
Krzysztof