* [PATCH v2] Documentation: clock: address more for clock-cells property
@ 2017-06-14 9:21 Chunyan Zhang
2017-06-14 9:42 ` Geert Uytterhoeven
0 siblings, 1 reply; 4+ messages in thread
From: Chunyan Zhang @ 2017-06-14 9:21 UTC (permalink / raw)
To: robh+dt, mturquette, sboyd
Cc: mark.rutland, linux-clk, devicetree, linux-kernel, zhang.lyra
The value of property 'clock-cells' is not determined only by the number
of clock outputs in one clock node, it is determined by whether the clock
output in this node can be referenced directly without index. If the
output clock has to be referenced by a index, the clock-cell of this
clock node can't be defined 0.
Signed-off-by: Chunyan Zhang <zhang.chunyan@linaro.org>
---
Documentation/devicetree/bindings/clock/clock-bindings.txt | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/Documentation/devicetree/bindings/clock/clock-bindings.txt b/Documentation/devicetree/bindings/clock/clock-bindings.txt
index 2ec489e..e2b76b4 100644
--- a/Documentation/devicetree/bindings/clock/clock-bindings.txt
+++ b/Documentation/devicetree/bindings/clock/clock-bindings.txt
@@ -18,6 +18,9 @@ Required properties:
with a single clock output and 1 for nodes with multiple
clock outputs.
+ There's one exception, please see the description for
+ clock-indices below.
+
Optional properties:
clock-output-names: Recommended to be a list of strings of clock output signal
names indexed by the first cell in the clock specifier.
@@ -48,6 +51,13 @@ clock-indices: If the identifying number for the clocks in the node
is not linear from zero, then this allows the mapping of
identifiers into the clock-output-names array.
+ This property not only servers for clocks with multiple
+ clock outputs, but also for clocks with a single clock
+ output whose identifying number is not zero.
+
+ So long as clock-indices is set, clock-cells cannot be
+ set zero.
+
For example, if we have two clocks <&oscillator 1> and <&oscillator 3>:
oscillator {
--
2.7.4
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH v2] Documentation: clock: address more for clock-cells property
2017-06-14 9:21 [PATCH v2] Documentation: clock: address more for clock-cells property Chunyan Zhang
@ 2017-06-14 9:42 ` Geert Uytterhoeven
2017-06-14 10:11 ` Chunyan Zhang
0 siblings, 1 reply; 4+ messages in thread
From: Geert Uytterhoeven @ 2017-06-14 9:42 UTC (permalink / raw)
To: Chunyan Zhang
Cc: Rob Herring, Michael Turquette, Stephen Boyd, Mark Rutland,
linux-clk, devicetree, linux-kernel, zhang.lyra
Hi Chunyan,
On Wed, Jun 14, 2017 at 11:21 AM, Chunyan Zhang
<zhang.chunyan@linaro.org> wrote:
> The value of property 'clock-cells' is not determined only by the number
> of clock outputs in one clock node, it is determined by whether the clock
> output in this node can be referenced directly without index. If the
> output clock has to be referenced by a index, the clock-cell of this
> clock node can't be defined 0.
>
> Signed-off-by: Chunyan Zhang <zhang.chunyan@linaro.org>
> ---
> Documentation/devicetree/bindings/clock/clock-bindings.txt | 10 ++++++++++
> 1 file changed, 10 insertions(+)
>
> diff --git a/Documentation/devicetree/bindings/clock/clock-bindings.txt b/Documentation/devicetree/bindings/clock/clock-bindings.txt
> index 2ec489e..e2b76b4 100644
> --- a/Documentation/devicetree/bindings/clock/clock-bindings.txt
> +++ b/Documentation/devicetree/bindings/clock/clock-bindings.txt
> @@ -18,6 +18,9 @@ Required properties:
> with a single clock output and 1 for nodes with multiple
> clock outputs.
>
> + There's one exception, please see the description for
> + clock-indices below.
> +
> Optional properties:
> clock-output-names: Recommended to be a list of strings of clock output signal
> names indexed by the first cell in the clock specifier.
> @@ -48,6 +51,13 @@ clock-indices: If the identifying number for the clocks in the node
> is not linear from zero, then this allows the mapping of
> identifiers into the clock-output-names array.
>
> + This property not only servers for clocks with multiple
serves
> + clock outputs, but also for clocks with a single clock
> + output whose identifying number is not zero.
Why would you want a single clock and a non-zero identifying number?
> + So long as clock-indices is set, clock-cells cannot be
> + set zero.
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
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v2] Documentation: clock: address more for clock-cells property
2017-06-14 9:42 ` Geert Uytterhoeven
@ 2017-06-14 10:11 ` Chunyan Zhang
2017-06-18 14:05 ` Rob Herring
0 siblings, 1 reply; 4+ messages in thread
From: Chunyan Zhang @ 2017-06-14 10:11 UTC (permalink / raw)
To: Geert Uytterhoeven
Cc: Rob Herring, Michael Turquette, Stephen Boyd, Mark Rutland,
linux-clk, devicetree, linux-kernel, Lyra Zhang
Hi Geert,
On 14 June 2017 at 17:42, Geert Uytterhoeven <geert@linux-m68k.org> wrote:
> Hi Chunyan,
>
> On Wed, Jun 14, 2017 at 11:21 AM, Chunyan Zhang
> <zhang.chunyan@linaro.org> wrote:
>> The value of property 'clock-cells' is not determined only by the number
>> of clock outputs in one clock node, it is determined by whether the clock
>> output in this node can be referenced directly without index. If the
>> output clock has to be referenced by a index, the clock-cell of this
>> clock node can't be defined 0.
>>
>> Signed-off-by: Chunyan Zhang <zhang.chunyan@linaro.org>
>> ---
>> Documentation/devicetree/bindings/clock/clock-bindings.txt | 10 ++++++++++
>> 1 file changed, 10 insertions(+)
>>
>> diff --git a/Documentation/devicetree/bindings/clock/clock-bindings.txt b/Documentation/devicetree/bindings/clock/clock-bindings.txt
>> index 2ec489e..e2b76b4 100644
>> --- a/Documentation/devicetree/bindings/clock/clock-bindings.txt
>> +++ b/Documentation/devicetree/bindings/clock/clock-bindings.txt
>> @@ -18,6 +18,9 @@ Required properties:
>> with a single clock output and 1 for nodes with multiple
>> clock outputs.
>>
>> + There's one exception, please see the description for
>> + clock-indices below.
>> +
>> Optional properties:
>> clock-output-names: Recommended to be a list of strings of clock output signal
>> names indexed by the first cell in the clock specifier.
>> @@ -48,6 +51,13 @@ clock-indices: If the identifying number for the clocks in the node
>> is not linear from zero, then this allows the mapping of
>> identifiers into the clock-output-names array.
>>
>> + This property not only servers for clocks with multiple
>
> serves
Thanks, I will fix that.
>
>> + clock outputs, but also for clocks with a single clock
>> + output whose identifying number is not zero.
>
> Why would you want a single clock and a non-zero identifying number?
Because of the probably weird hardwire design :)
There indeed some clocks like that on the platform I'm working on.
>
>> + So long as clock-indices is set, clock-cells cannot be
>> + set zero.
>
> Gr{oetje,eeting}s,
>
> Geert
Thanks for your review,
Chunyan
>
> --
> 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
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v2] Documentation: clock: address more for clock-cells property
2017-06-14 10:11 ` Chunyan Zhang
@ 2017-06-18 14:05 ` Rob Herring
0 siblings, 0 replies; 4+ messages in thread
From: Rob Herring @ 2017-06-18 14:05 UTC (permalink / raw)
To: Chunyan Zhang
Cc: Geert Uytterhoeven, Michael Turquette, Stephen Boyd,
Mark Rutland, linux-clk, devicetree, linux-kernel, Lyra Zhang
On Wed, Jun 14, 2017 at 06:11:37PM +0800, Chunyan Zhang wrote:
> Hi Geert,
>
> On 14 June 2017 at 17:42, Geert Uytterhoeven <geert@linux-m68k.org> wrote:
> > Hi Chunyan,
> >
> > On Wed, Jun 14, 2017 at 11:21 AM, Chunyan Zhang
> > <zhang.chunyan@linaro.org> wrote:
> >> The value of property 'clock-cells' is not determined only by the number
> >> of clock outputs in one clock node, it is determined by whether the clock
> >> output in this node can be referenced directly without index. If the
> >> output clock has to be referenced by a index, the clock-cell of this
> >> clock node can't be defined 0.
> >>
> >> Signed-off-by: Chunyan Zhang <zhang.chunyan@linaro.org>
> >> ---
> >> Documentation/devicetree/bindings/clock/clock-bindings.txt | 10 ++++++++++
> >> 1 file changed, 10 insertions(+)
> >>
> >> diff --git a/Documentation/devicetree/bindings/clock/clock-bindings.txt b/Documentation/devicetree/bindings/clock/clock-bindings.txt
> >> index 2ec489e..e2b76b4 100644
> >> --- a/Documentation/devicetree/bindings/clock/clock-bindings.txt
> >> +++ b/Documentation/devicetree/bindings/clock/clock-bindings.txt
> >> @@ -18,6 +18,9 @@ Required properties:
> >> with a single clock output and 1 for nodes with multiple
> >> clock outputs.
> >>
> >> + There's one exception, please see the description for
> >> + clock-indices below.
> >> +
> >> Optional properties:
> >> clock-output-names: Recommended to be a list of strings of clock output signal
> >> names indexed by the first cell in the clock specifier.
> >> @@ -48,6 +51,13 @@ clock-indices: If the identifying number for the clocks in the node
> >> is not linear from zero, then this allows the mapping of
> >> identifiers into the clock-output-names array.
> >>
> >> + This property not only servers for clocks with multiple
> >
> > serves
>
> Thanks, I will fix that.
>
> >
> >> + clock outputs, but also for clocks with a single clock
> >> + output whose identifying number is not zero.
> >
> > Why would you want a single clock and a non-zero identifying number?
>
> Because of the probably weird hardwire design :)
> There indeed some clocks like that on the platform I'm working on.
But still, why do you care what the ID# is?
Rob
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2017-06-18 14:06 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-06-14 9:21 [PATCH v2] Documentation: clock: address more for clock-cells property Chunyan Zhang
2017-06-14 9:42 ` Geert Uytterhoeven
2017-06-14 10:11 ` Chunyan Zhang
2017-06-18 14:05 ` Rob Herring
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.