diff mbox series

dt-bindings: mmc: meson-gx: fix interrupt binding

Message ID d5542f6e-920e-93cf-a453-b0601d03f48d@gmail.com (mailing list archive)
State New, archived
Headers show
Series dt-bindings: mmc: meson-gx: fix interrupt binding | expand

Commit Message

Heiner Kallweit Feb. 16, 2023, 11:49 a.m. UTC
Reflect in the binding that the cd interrupt is optional,
and add a description of the interrupts.

Fixes: 09b31a610328 ("dt-bindings: mmc: meson-gx: support specifying cd interrupt")
Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
---
 .../devicetree/bindings/mmc/amlogic,meson-gx-mmc.yaml         | 4 ++++
 1 file changed, 4 insertions(+)

Comments

Neil Armstrong Feb. 16, 2023, 12:52 p.m. UTC | #1
On 16/02/2023 12:49, Heiner Kallweit wrote:
> Reflect in the binding that the cd interrupt is optional,
> and add a description of the interrupts.
> 
> Fixes: 09b31a610328 ("dt-bindings: mmc: meson-gx: support specifying cd interrupt")
> Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
> ---
>   .../devicetree/bindings/mmc/amlogic,meson-gx-mmc.yaml         | 4 ++++
>   1 file changed, 4 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/mmc/amlogic,meson-gx-mmc.yaml b/Documentation/devicetree/bindings/mmc/amlogic,meson-gx-mmc.yaml
> index c8c30300d..cd3f75821 100644
> --- a/Documentation/devicetree/bindings/mmc/amlogic,meson-gx-mmc.yaml
> +++ b/Documentation/devicetree/bindings/mmc/amlogic,meson-gx-mmc.yaml
> @@ -28,7 +28,11 @@ properties:
>       maxItems: 1
>   
>     interrupts:
> +    minItems: 1
>       maxItems: 2
> +    description:
> +      mmc controller instance interrupt
> +      optional card detect interrupt

I would instead write:

interrupts:
   minItems: 1
   items:
     - description: mmc controller instance
     - description: card detect

and drop maxItems.

Neil
>   
>     clocks:
>       maxItems: 3
Krzysztof Kozlowski Feb. 16, 2023, 1:43 p.m. UTC | #2
On 16/02/2023 13:52, Neil Armstrong wrote:
>>     interrupts:
>> +    minItems: 1
>>       maxItems: 2
>> +    description:
>> +      mmc controller instance interrupt
>> +      optional card detect interrupt
> 
> I would instead write:
> 
> interrupts:
>    minItems: 1
>    items:
>      - description: mmc controller instance
>      - description: card detect
> 
> and drop maxItems.

+1

Best regards,
Krzysztof
Heiner Kallweit Feb. 16, 2023, 7:44 p.m. UTC | #3
On 16.02.2023 13:52, Neil Armstrong wrote:
> On 16/02/2023 12:49, Heiner Kallweit wrote:
>> Reflect in the binding that the cd interrupt is optional,
>> and add a description of the interrupts.
>>
>> Fixes: 09b31a610328 ("dt-bindings: mmc: meson-gx: support specifying cd interrupt")
>> Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
>> ---
>>   .../devicetree/bindings/mmc/amlogic,meson-gx-mmc.yaml         | 4 ++++
>>   1 file changed, 4 insertions(+)
>>
>> diff --git a/Documentation/devicetree/bindings/mmc/amlogic,meson-gx-mmc.yaml b/Documentation/devicetree/bindings/mmc/amlogic,meson-gx-mmc.yaml
>> index c8c30300d..cd3f75821 100644
>> --- a/Documentation/devicetree/bindings/mmc/amlogic,meson-gx-mmc.yaml
>> +++ b/Documentation/devicetree/bindings/mmc/amlogic,meson-gx-mmc.yaml
>> @@ -28,7 +28,11 @@ properties:
>>       maxItems: 1
>>       interrupts:
>> +    minItems: 1
>>       maxItems: 2
>> +    description:
>> +      mmc controller instance interrupt
>> +      optional card detect interrupt
> 
> I would instead write:
> 
> interrupts:
>   minItems: 1
>   items:
>     - description: mmc controller instance
>     - description: card detect
> 
> and drop maxItems.
> 
Thanks for the hint! Bindings isn't really my area of expertise (yet).

> Neil
>>       clocks:
>>       maxItems: 3
>
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/mmc/amlogic,meson-gx-mmc.yaml b/Documentation/devicetree/bindings/mmc/amlogic,meson-gx-mmc.yaml
index c8c30300d..cd3f75821 100644
--- a/Documentation/devicetree/bindings/mmc/amlogic,meson-gx-mmc.yaml
+++ b/Documentation/devicetree/bindings/mmc/amlogic,meson-gx-mmc.yaml
@@ -28,7 +28,11 @@  properties:
     maxItems: 1
 
   interrupts:
+    minItems: 1
     maxItems: 2
+    description:
+      mmc controller instance interrupt
+      optional card detect interrupt
 
   clocks:
     maxItems: 3