diff mbox

[01/16] pwm: samsung: Update DT bindings documentation to cover clocks

Message ID 1377019903-14614-2-git-send-email-t.figa@samsung.com (mailing list archive)
State New, archived
Headers show

Commit Message

Tomasz Figa Aug. 20, 2013, 5:31 p.m. UTC
PWM driver consumes at least one and up to three clocks, which need to be
specified in device tree when used. This patch updates bindings
documentation to add information about clocks.

Signed-off-by: Tomasz Figa <t.figa@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
---
 Documentation/devicetree/bindings/pwm/pwm-samsung.txt | 12 ++++++++++++
 1 file changed, 12 insertions(+)

Comments

Stephen Warren Aug. 20, 2013, 8:34 p.m. UTC | #1
On 08/20/2013 11:31 AM, Tomasz Figa wrote:
> PWM driver consumes at least one and up to three clocks, which need to be
> specified in device tree when used. This patch updates bindings
> documentation to add information about clocks.

> diff --git a/Documentation/devicetree/bindings/pwm/pwm-samsung.txt b/Documentation/devicetree/bindings/pwm/pwm-samsung.txt

> +- clock-names: should contain all following required clock names:
> +    - "timers" - PWM base clock used to generate PWM signals,
> +  and any subset of following optional clock names:
> +    - "pwm-tclk0" - first external PWM clock source,
> +    - "pwm-tclk1" - second external PWM clock source.
> +  Note that not all IP variants allow using all external clock sources.
> +  Refer to SoC documentation to learn which clock source configurations
> +  are available.

It might be nice to explicitly enumerate which variants (or rather, I
suppose which exact compatible values) support which optional clocks.
However, I suppose it's fine to just say "go read the HW manual" instead.

So, this patch,
Acked-by: Stephen Warren <swarren@nvidia.com>

(although this patch isn't backwards-compatible since before now, DT
nodes didn't need to provide any entries in clocks)
--
To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Tomasz Figa Aug. 20, 2013, 10:32 p.m. UTC | #2
On Tuesday 20 of August 2013 14:34:30 Stephen Warren wrote:
> On 08/20/2013 11:31 AM, Tomasz Figa wrote:
> > PWM driver consumes at least one and up to three clocks, which need to
> > be specified in device tree when used. This patch updates bindings
> > documentation to add information about clocks.
> > 
> > diff --git a/Documentation/devicetree/bindings/pwm/pwm-samsung.txt
> > b/Documentation/devicetree/bindings/pwm/pwm-samsung.txt
> > 
> > +- clock-names: should contain all following required clock names:
> > +    - "timers" - PWM base clock used to generate PWM signals,
> > +  and any subset of following optional clock names:
> > +    - "pwm-tclk0" - first external PWM clock source,
> > +    - "pwm-tclk1" - second external PWM clock source.
> > +  Note that not all IP variants allow using all external clock
> > sources. +  Refer to SoC documentation to learn which clock source
> > configurations +  are available.
> 
> It might be nice to explicitly enumerate which variants (or rather, I
> suppose which exact compatible values) support which optional clocks.
> However, I suppose it's fine to just say "go read the HW manual"
> instead.

I don't have enough information about some of the variants, so I decided 
to put it this way, instead of making an incomplete list or speculating 
about things.

> So, this patch,
> Acked-by: Stephen Warren <swarren@nvidia.com>

Thanks.

> (although this patch isn't backwards-compatible since before now, DT
> nodes didn't need to provide any entries in clocks)

The thing is that the clocks were supposed to be there from the beginning, 
but in a hurry I forgot to specify them in original bindings documentation 
and things were running over compatibility clkdev aliases anyway, so 
nobody (including me) noticed.

Best regards,
Tomasz

--
To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/Documentation/devicetree/bindings/pwm/pwm-samsung.txt b/Documentation/devicetree/bindings/pwm/pwm-samsung.txt
index 4caa1a7..d61fccd 100644
--- a/Documentation/devicetree/bindings/pwm/pwm-samsung.txt
+++ b/Documentation/devicetree/bindings/pwm/pwm-samsung.txt
@@ -19,6 +19,16 @@  Required properties:
 - reg: base address and size of register area
 - interrupts: list of timer interrupts (one interrupt per timer, starting at
   timer 0)
+- clock-names: should contain all following required clock names:
+    - "timers" - PWM base clock used to generate PWM signals,
+  and any subset of following optional clock names:
+    - "pwm-tclk0" - first external PWM clock source,
+    - "pwm-tclk1" - second external PWM clock source.
+  Note that not all IP variants allow using all external clock sources.
+  Refer to SoC documentation to learn which clock source configurations
+  are available.
+- clocks: should contain clock specifiers of all clocks, which input names
+  have been specified in clock-names property, in same order.
 - #pwm-cells: should be 3. See pwm.txt in this directory for a description of
   the cells format. The only third cell flag supported by this binding is
   PWM_POLARITY_INVERTED.
@@ -34,6 +44,8 @@  Example:
 		reg = <0x7f006000 0x1000>;
 		interrupt-parent = <&vic0>;
 		interrupts = <23>, <24>, <25>, <27>, <28>;
+		clocks = <&clock 67>;
+		clock-names = "timers";
 		samsung,pwm-outputs = <0>, <1>;
 		#pwm-cells = <3>;
 	}