Message ID | 20210519201551.690654-3-daniel@zonque.org |
---|---|
State | Superseded |
Headers | show |
Series | clk: cs2000-cp: make aux output pin configurable | expand |
On Wed, 19 May 2021 22:15:50 +0200, Daniel Mack wrote: > This new optional property can be used to control the function of the > auxiliary output pin. Introduce a new dt-bindings include file that > contains the numerical values. > > Signed-off-by: Daniel Mack <daniel@zonque.org> > --- > .../bindings/clock/cirrus,cs2000-cp.yaml | 13 +++++++++++++ > include/dt-bindings/clock/cirrus,cs2000-cp.h | 14 ++++++++++++++ > 2 files changed, 27 insertions(+) > create mode 100644 include/dt-bindings/clock/cirrus,cs2000-cp.h > Reviewed-by: Rob Herring <robh@kernel.org>
On 5/21/21 4:00 AM, Rob Herring wrote: > On Wed, 19 May 2021 22:15:50 +0200, Daniel Mack wrote: >> This new optional property can be used to control the function of the >> auxiliary output pin. Introduce a new dt-bindings include file that >> contains the numerical values. >> >> Signed-off-by: Daniel Mack <daniel@zonque.org> >> --- >> .../bindings/clock/cirrus,cs2000-cp.yaml | 13 +++++++++++++ >> include/dt-bindings/clock/cirrus,cs2000-cp.h | 14 ++++++++++++++ >> 2 files changed, 27 insertions(+) >> create mode 100644 include/dt-bindings/clock/cirrus,cs2000-cp.h >> > > Reviewed-by: Rob Herring <robh@kernel.org> > Thanks Rob! Mike, Stephen, do you want me to resend with Rob's ack? Thanks, Daniel
Hi Daniel, On Wed, May 19, 2021 at 10:23 PM Daniel Mack <daniel@zonque.org> wrote: > This new optional property can be used to control the function of the > auxiliary output pin. Introduce a new dt-bindings include file that > contains the numerical values. > > Signed-off-by: Daniel Mack <daniel@zonque.org> Thanks for your patch! > --- a/Documentation/devicetree/bindings/clock/cirrus,cs2000-cp.yaml > +++ b/Documentation/devicetree/bindings/clock/cirrus,cs2000-cp.yaml > @@ -37,6 +37,16 @@ properties: > reg: > maxItems: 1 > > + cirrus,aux-output-source: > + description: > + Specfies the function of the auxililary clock output pin Specifies ... auxiliary > + $ref: /schemas/types.yaml#/definitions/uint32 > + enum: > + - 0 # CS2000CP_AUX_OUTPUT_REF_CLK: ref_clk input > + - 1 # CS2000CP_AUX_OUTPUT_CLK_IN: clk_in input > + - 2 # CS2000CP_AUX_OUTPUT_CLK_OUT: clk_out output > + - 3 # CS2000CP_AUX_OUTPUT_PLL_LOCK: pll lock status Should the default be documented? "default: 0"? Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds
Hi Geert, Thanks for looking into this patch! On 6/11/21 2:18 PM, Geert Uytterhoeven wrote: >> + cirrus,aux-output-source: >> + description: >> + Specfies the function of the auxililary clock output pin > > Specifies ... auxiliary > >> + $ref: /schemas/types.yaml#/definitions/uint32 >> + enum: >> + - 0 # CS2000CP_AUX_OUTPUT_REF_CLK: ref_clk input >> + - 1 # CS2000CP_AUX_OUTPUT_CLK_IN: clk_in input >> + - 2 # CS2000CP_AUX_OUTPUT_CLK_OUT: clk_out output >> + - 3 # CS2000CP_AUX_OUTPUT_PLL_LOCK: pll lock status > > Should the default be documented? "default: 0"? Both addressed. I will send a new series soon that supersedes this one and carries some more changes. Daniel
diff --git a/Documentation/devicetree/bindings/clock/cirrus,cs2000-cp.yaml b/Documentation/devicetree/bindings/clock/cirrus,cs2000-cp.yaml index 379a8bab49ca..72902192e084 100644 --- a/Documentation/devicetree/bindings/clock/cirrus,cs2000-cp.yaml +++ b/Documentation/devicetree/bindings/clock/cirrus,cs2000-cp.yaml @@ -37,6 +37,16 @@ properties: reg: maxItems: 1 + cirrus,aux-output-source: + description: + Specfies the function of the auxililary clock output pin + $ref: /schemas/types.yaml#/definitions/uint32 + enum: + - 0 # CS2000CP_AUX_OUTPUT_REF_CLK: ref_clk input + - 1 # CS2000CP_AUX_OUTPUT_CLK_IN: clk_in input + - 2 # CS2000CP_AUX_OUTPUT_CLK_OUT: clk_out output + - 3 # CS2000CP_AUX_OUTPUT_PLL_LOCK: pll lock status + required: - compatible - reg @@ -48,6 +58,8 @@ additionalProperties: false examples: - | + #include <dt-bindings/clock/cirrus,cs2000-cp.h> + i2c@0 { reg = <0x0 0x100>; #address-cells = <1>; @@ -59,5 +71,6 @@ examples: reg = <0x4f>; clocks = <&rcar_sound 0>, <&x12_clk>; clock-names = "clk_in", "ref_clk"; + cirrus,aux-output-source = <CS2000CP_AUX_OUTPUT_CLK_OUT>; }; }; diff --git a/include/dt-bindings/clock/cirrus,cs2000-cp.h b/include/dt-bindings/clock/cirrus,cs2000-cp.h new file mode 100644 index 000000000000..fe3ac71750a8 --- /dev/null +++ b/include/dt-bindings/clock/cirrus,cs2000-cp.h @@ -0,0 +1,14 @@ +/* SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) */ +/* + * Copyright (C) 2021 Daniel Mack + */ + +#ifndef __DT_BINDINGS_CS2000CP_CLK_H +#define __DT_BINDINGS_CS2000CP_CLK_H + +#define CS2000CP_AUX_OUTPUT_REF_CLK 0 +#define CS2000CP_AUX_OUTPUT_CLK_IN 1 +#define CS2000CP_AUX_OUTPUT_CLK_OUT 2 +#define CS2000CP_AUX_OUTPUT_PLL_LOCK 3 + +#endif /* __DT_BINDINGS_CS2000CP_CLK_H */
This new optional property can be used to control the function of the auxiliary output pin. Introduce a new dt-bindings include file that contains the numerical values. Signed-off-by: Daniel Mack <daniel@zonque.org> --- .../bindings/clock/cirrus,cs2000-cp.yaml | 13 +++++++++++++ include/dt-bindings/clock/cirrus,cs2000-cp.h | 14 ++++++++++++++ 2 files changed, 27 insertions(+) create mode 100644 include/dt-bindings/clock/cirrus,cs2000-cp.h