diff mbox series

[RESEND,v4,06/10] dt-bindings: gpio: change items restriction of clock for rockchip,gpio-bank

Message ID 20210513064606.18397-1-cl@rock-chips.com
State Changes Requested
Headers show
Series None | expand

Checks

Context Check Description
robh/checkpatch success
robh/dt-meta-schema success
robh/dtbs-check fail build log

Commit Message

陈亮 May 13, 2021, 6:46 a.m. UTC
From: Liang Chen <cl@rock-chips.com>

The clock property need 2 items on some rockchip chips.

Signed-off-by: Liang Chen <cl@rock-chips.com>
---
 Documentation/devicetree/bindings/gpio/rockchip,gpio-bank.yaml | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

Comments

Heiko Stübner May 14, 2021, 10:06 a.m. UTC | #1
Hi,

Am Donnerstag, 13. Mai 2021, 08:46:06 CEST schrieb cl@rock-chips.com:
> From: Liang Chen <cl@rock-chips.com>
> 
> The clock property need 2 items on some rockchip chips.
> 
> Signed-off-by: Liang Chen <cl@rock-chips.com>

this patch should definitly move over to Jianquns gpio driver series,
as it introduces the usage of these new clocks.

Also while the single-clock variant definitly doesn't need it,
I think we may want clock-names "apb_pclk", "debounce-ref" for the
2-clock variants?


Heiko

> ---
>  Documentation/devicetree/bindings/gpio/rockchip,gpio-bank.yaml | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
> 
> diff --git a/Documentation/devicetree/bindings/gpio/rockchip,gpio-bank.yaml b/Documentation/devicetree/bindings/gpio/rockchip,gpio-bank.yaml
> index d993e00..0d62c28 100644
> --- a/Documentation/devicetree/bindings/gpio/rockchip,gpio-bank.yaml
> +++ b/Documentation/devicetree/bindings/gpio/rockchip,gpio-bank.yaml
> @@ -22,7 +22,10 @@ properties:
>      maxItems: 1
>  
>    clocks:
> -    maxItems: 1
> +    minItems: 1
> +    items:
> +      - description: APB interface clock source
> +      - description: GPIO debounce reference clock source
>  
>    gpio-controller: true
>  
>
Heiko Stübner June 18, 2021, 7:01 a.m. UTC | #2
Hi Jay,

Am Freitag, 18. Juni 2021, 08:41:45 CEST schrieb jay.xu@rock-chips.com:
> Hi Heiko
> 
> --------------
> jay.xu@rock-chips.com
> >Hi,
> >
> >Am Donnerstag, 13. Mai 2021, 08:46:06 CEST schrieb cl@rock-chips.com:
> >> From: Liang Chen <cl@rock-chips.com>
> >>
> >> The clock property need 2 items on some rockchip chips.
> >>
> >> Signed-off-by: Liang Chen <cl@rock-chips.com>
> >
> >this patch should definitly move over to Jianquns gpio driver series,
> >as it introduces the usage of these new clocks.
> >
> >Also while the single-clock variant definitly doesn't need it,
> >I think we may want clock-names "apb_pclk", "debounce-ref" for the
> >2-clock variants?
> > 
> Okay, I think it's very good idea, 
> but is it possible to post the reg-name patch after these dts serial and gpio serial patches ?

You're already creating a new binding when changing the max-items.
So when we change that again later, in theory you'd need to support both
cases (with and without clock-names)

So I'd really prefer to get the binding right the first time and
identifying multiple clocks by clock-names instead of an implicit ordering
is way better in the long run as well.

Heiko




> 
> >
> >Heiko
> >
> >> ---
> >>  Documentation/devicetree/bindings/gpio/rockchip,gpio-bank.yaml | 5 ++++-
> >>  1 file changed, 4 insertions(+), 1 deletion(-)
> >>
> >> diff --git a/Documentation/devicetree/bindings/gpio/rockchip,gpio-bank.yaml b/Documentation/devicetree/bindings/gpio/rockchip,gpio-bank.yaml
> >> index d993e00..0d62c28 100644
> >> --- a/Documentation/devicetree/bindings/gpio/rockchip,gpio-bank.yaml
> >> +++ b/Documentation/devicetree/bindings/gpio/rockchip,gpio-bank.yaml
> >> @@ -22,7 +22,10 @@ properties:
> >>      maxItems: 1
> >> 
> >>    clocks:
> >> -    maxItems: 1
> >> +    minItems: 1
> >> +    items:
> >> +      - description: APB interface clock source
> >> +      - description: GPIO debounce reference clock source
> >> 
> >>    gpio-controller: true
> >> 
> >>
> >
> >
> >
> >
> >
> >
> >
>
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/gpio/rockchip,gpio-bank.yaml b/Documentation/devicetree/bindings/gpio/rockchip,gpio-bank.yaml
index d993e00..0d62c28 100644
--- a/Documentation/devicetree/bindings/gpio/rockchip,gpio-bank.yaml
+++ b/Documentation/devicetree/bindings/gpio/rockchip,gpio-bank.yaml
@@ -22,7 +22,10 @@  properties:
     maxItems: 1
 
   clocks:
-    maxItems: 1
+    minItems: 1
+    items:
+      - description: APB interface clock source
+      - description: GPIO debounce reference clock source
 
   gpio-controller: true