diff mbox series

[v3,3/9] dt-bindings: clock: cs2000-cp: make clk_in optional

Message ID 20210617190912.262809-4-daniel@zonque.org
State New
Headers show
Series clk: cs2000-cp: add dynamic mode and more features | expand

Commit Message

Daniel Mack June 17, 2021, 7:09 p.m. UTC
CLK_IN is only used in dynamic mode and is hence optional.

Re-order the clocks so REF_CLK is specified first.

Signed-off-by: Daniel Mack <daniel@zonque.org>
---
 .../devicetree/bindings/clock/cirrus,cs2000-cp.yaml   | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

Comments

Rob Herring June 24, 2021, 9:33 p.m. UTC | #1
On Thu, Jun 17, 2021 at 09:09:06PM +0200, Daniel Mack wrote:
> CLK_IN is only used in dynamic mode and is hence optional.

> 

> Re-order the clocks so REF_CLK is specified first.


It's not a compatible change. You can't do that unless you can explain 
why it doesn't matter.

> 

> Signed-off-by: Daniel Mack <daniel@zonque.org>

> ---

>  .../devicetree/bindings/clock/cirrus,cs2000-cp.yaml   | 11 ++++++-----

>  1 file changed, 6 insertions(+), 5 deletions(-)

> 

> diff --git a/Documentation/devicetree/bindings/clock/cirrus,cs2000-cp.yaml b/Documentation/devicetree/bindings/clock/cirrus,cs2000-cp.yaml

> index 79b90500f6ac..68efed8e5033 100644

> --- a/Documentation/devicetree/bindings/clock/cirrus,cs2000-cp.yaml

> +++ b/Documentation/devicetree/bindings/clock/cirrus,cs2000-cp.yaml

> @@ -22,14 +22,15 @@ properties:

>  

>    clocks:

>      description:

> -      Common clock binding for CLK_IN, XTI/REF_CLK

> -    minItems: 2

> +      Common clock binding for XTI/REF_CLK, CLK_IN.

> +      CLK_IN is optional and only used in dynamic mode.

> +    minItems: 1

>      maxItems: 2

>  

>    clock-names:

>      items:

> -      - const: clk_in

>        - const: ref_clk

> +      - const: clk_in

>  

>    '#clock-cells':

>      const: 0

> @@ -70,8 +71,8 @@ examples:

>          #clock-cells = <0>;

>          compatible = "cirrus,cs2000-cp";

>          reg = <0x4f>;

> -        clocks = <&rcar_sound 0>, <&x12_clk>;

> -        clock-names = "clk_in", "ref_clk";

> +        clocks = <&x12_clk>, <&rcar_sound 0>;

> +        clock-names = "ref_clk", "clk_in";

>          cirrus,aux-output-source = <CS2000CP_AUX_OUTPUT_CLK_OUT>;

>        };

>      };

> -- 

> 2.31.1

> 

>
Daniel Mack June 28, 2021, 4:03 p.m. UTC | #2
On 6/24/21 11:33 PM, Rob Herring wrote:
> On Thu, Jun 17, 2021 at 09:09:06PM +0200, Daniel Mack wrote:

>> CLK_IN is only used in dynamic mode and is hence optional.

>>

>> Re-order the clocks so REF_CLK is specified first.

> 

> It's not a compatible change. You can't do that unless you can explain 

> why it doesn't matter.


Hmm okay. And that rule also applies even if I patch all mainline users?


Daniel


> 

>>

>> Signed-off-by: Daniel Mack <daniel@zonque.org>

>> ---

>>  .../devicetree/bindings/clock/cirrus,cs2000-cp.yaml   | 11 ++++++-----

>>  1 file changed, 6 insertions(+), 5 deletions(-)

>>

>> diff --git a/Documentation/devicetree/bindings/clock/cirrus,cs2000-cp.yaml b/Documentation/devicetree/bindings/clock/cirrus,cs2000-cp.yaml

>> index 79b90500f6ac..68efed8e5033 100644

>> --- a/Documentation/devicetree/bindings/clock/cirrus,cs2000-cp.yaml

>> +++ b/Documentation/devicetree/bindings/clock/cirrus,cs2000-cp.yaml

>> @@ -22,14 +22,15 @@ properties:

>>  

>>    clocks:

>>      description:

>> -      Common clock binding for CLK_IN, XTI/REF_CLK

>> -    minItems: 2

>> +      Common clock binding for XTI/REF_CLK, CLK_IN.

>> +      CLK_IN is optional and only used in dynamic mode.

>> +    minItems: 1

>>      maxItems: 2

>>  

>>    clock-names:

>>      items:

>> -      - const: clk_in

>>        - const: ref_clk

>> +      - const: clk_in

>>  

>>    '#clock-cells':

>>      const: 0

>> @@ -70,8 +71,8 @@ examples:

>>          #clock-cells = <0>;

>>          compatible = "cirrus,cs2000-cp";

>>          reg = <0x4f>;

>> -        clocks = <&rcar_sound 0>, <&x12_clk>;

>> -        clock-names = "clk_in", "ref_clk";

>> +        clocks = <&x12_clk>, <&rcar_sound 0>;

>> +        clock-names = "ref_clk", "clk_in";

>>          cirrus,aux-output-source = <CS2000CP_AUX_OUTPUT_CLK_OUT>;

>>        };

>>      };

>> -- 

>> 2.31.1

>>

>>
Rob Herring July 1, 2021, 4:07 p.m. UTC | #3
On Mon, Jun 28, 2021 at 10:03 AM Daniel Mack <daniel@zonque.org> wrote:
>

> On 6/24/21 11:33 PM, Rob Herring wrote:

> > On Thu, Jun 17, 2021 at 09:09:06PM +0200, Daniel Mack wrote:

> >> CLK_IN is only used in dynamic mode and is hence optional.

> >>

> >> Re-order the clocks so REF_CLK is specified first.

> >

> > It's not a compatible change. You can't do that unless you can explain

> > why it doesn't matter.

>

> Hmm okay. And that rule also applies even if I patch all mainline users?


Explaining why you are doing something and the implications of the
change, yes that's required for every commit. Whether you can make
incompatible changes, that's up to platform maintainers. I only ask
that doing that is documented clearly.

Do you know that every user of affected h/w is okay with you requiring
them update their dtb?

Rob
Daniel Mack July 2, 2021, 12:34 p.m. UTC | #4
On 7/1/21 6:07 PM, Rob Herring wrote:
> On Mon, Jun 28, 2021 at 10:03 AM Daniel Mack <daniel@zonque.org> wrote:

>>

>> On 6/24/21 11:33 PM, Rob Herring wrote:

>>> On Thu, Jun 17, 2021 at 09:09:06PM +0200, Daniel Mack wrote:

>>>> CLK_IN is only used in dynamic mode and is hence optional.

>>>>

>>>> Re-order the clocks so REF_CLK is specified first.

>>>

>>> It's not a compatible change. You can't do that unless you can explain

>>> why it doesn't matter.

>>

>> Hmm okay. And that rule also applies even if I patch all mainline users?

> 

> Explaining why you are doing something and the implications of the

> change, yes that's required for every commit. Whether you can make

> incompatible changes, that's up to platform maintainers. I only ask

> that doing that is documented clearly.

> 

> Do you know that every user of affected h/w is okay with you requiring

> them update their dtb?


Alright, I'll rework that to use a new property then for mode selection.
and repost.


Thanks,
Daniel
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/clock/cirrus,cs2000-cp.yaml b/Documentation/devicetree/bindings/clock/cirrus,cs2000-cp.yaml
index 79b90500f6ac..68efed8e5033 100644
--- a/Documentation/devicetree/bindings/clock/cirrus,cs2000-cp.yaml
+++ b/Documentation/devicetree/bindings/clock/cirrus,cs2000-cp.yaml
@@ -22,14 +22,15 @@  properties:
 
   clocks:
     description:
-      Common clock binding for CLK_IN, XTI/REF_CLK
-    minItems: 2
+      Common clock binding for XTI/REF_CLK, CLK_IN.
+      CLK_IN is optional and only used in dynamic mode.
+    minItems: 1
     maxItems: 2
 
   clock-names:
     items:
-      - const: clk_in
       - const: ref_clk
+      - const: clk_in
 
   '#clock-cells':
     const: 0
@@ -70,8 +71,8 @@  examples:
         #clock-cells = <0>;
         compatible = "cirrus,cs2000-cp";
         reg = <0x4f>;
-        clocks = <&rcar_sound 0>, <&x12_clk>;
-        clock-names = "clk_in", "ref_clk";
+        clocks = <&x12_clk>, <&rcar_sound 0>;
+        clock-names = "ref_clk", "clk_in";
         cirrus,aux-output-source = <CS2000CP_AUX_OUTPUT_CLK_OUT>;
       };
     };