Skip to contentSkip to conversation

ASoC: wm8994: Add clock bindings to the device tree

PATCH In review Mark Brown 3 participants 6 messages Jul 25, 2013 – Jul 26, 2013

Subsystems (3)
lore
Share & tools
lore

Mark Brown

author maintainer
#0 lore raw

PATCH 1/1 ASoC: wm8994: Add clock bindings to the device tree

From: Mark Brown <[email protected]>

Due to the variable availability of the clock API there is no code in the driver to use these at present, for the time being the machine drivers will need to handle requesting clocks.

---
 Documentation/devicetree/bindings/sound/wm8994.txt | 4 ++++
 1 file changed, 4 insertions(+)
Documentation/devicetree/bindings/sound/wm8994.txt +4 -0
index f2f3e80..e045e90 100644
@@ -32,6 +32,10 @@ Optional properties:
     The second cell is the flags, encoded as the trigger masks from
     Documentation/devicetree/bindings/interrupts.txt
 
+  - clocks : A list of up to two phandle and clock specifier pairs
+  - clock-names : A list of clock names sorted in the same order as clocks.
+                  Valid clock names are "MCLK1" and "MCLK2".
+
   - wlf,gpio-cfg : A list of GPIO configuration register values. If absent,
     no configuration of these registers is performed. If any value is
     over 0xffff then the register will be left as default. If present 11
Signature · 1 line
1.8.3.2
Acked-by on v1 1/1
#1 lore raw
Quoted 7 lines · Mark Brown

From: Mark Brown <[email protected]>

Due to the variable availability of the clock API there is no code in the driver to use these at present, for the time being the machine drivers will need to handle requesting clocks.

Do these two clock inputs exist for all of wm1811, wm8994, and wm8958?

If I've read the context correctly, these are optional. Does this mean that if not listed that an OS can assume they are already configured and active? It would be nice to document that.

Otherwise, this looks sensible:

Thanks,
Mark.

Quoted 23 lines
---
 Documentation/devicetree/bindings/sound/wm8994.txt | 4 ++++
 1 file changed, 4 insertions(+)
Documentation/devicetree/bindings/sound/wm8994.txt +4 -0
index f2f3e80..e045e90 100644
@@ -32,6 +32,10 @@ Optional properties:
     The second cell is the flags, encoded as the trigger masks from
     Documentation/devicetree/bindings/interrupts.txt
 
+  - clocks : A list of up to two phandle and clock specifier pairs
+  - clock-names : A list of clock names sorted in the same order as clocks.
+                  Valid clock names are "MCLK1" and "MCLK2".
+
   - wlf,gpio-cfg : A list of GPIO configuration register values. If absent,
     no configuration of these registers is performed. If any value is
     over 0xffff then the register will be left as default. If present 11
Signature · 1 line
1.8.3.2
author maintainer
#2 lore raw
Quoted 1 line · Mark Rutland

Do these two clock inputs exist for all of wm1811, wm8994, and wm8958?

Yes.

Quoted 3 lines

If I've read the context correctly, these are optional. Does this mean that if not listed that an OS can assume they are already configured and active? It would be nice to document that.

The clocks are both optional but even if they were assumed to be present they aren't usable without knowing the rate which can vary widely. It is possible that the system may be able to infer their presence and rates from other information such as the audio system integration compatible string but that's out of scope for this and doesn't seem like a particularly good idea to encorage anyway.

#3 lore raw
Quoted 10 lines · Mark Brown
Quoted 1 line · Mark Rutland

Do these two clock inputs exist for all of wm1811, wm8994, and wm8958?

Yes.

Quoted 3 lines

If I've read the context correctly, these are optional. Does this mean that if not listed that an OS can assume they are already configured and active? It would be nice to document that.

Quoted 6 lines

The clocks are both optional but even if they were assumed to be present they aren't usable without knowing the rate which can vary widely. It is possible that the system may be able to infer their presence and rates from other information such as the audio system integration compatible string but that's out of scope for this and doesn't seem like a particularly good idea to encorage anyway.

Ok, that sounds sensible.

Thanks,
Mark.

#4 lore raw
In reply to Mark Brown
Quoted 5 lines · Mark Brown

From: Mark Brown <[email protected]>

Due to the variable availability of the clock API there is no code in the driver to use these at present, for the time being the machine drivers will need to handle requesting clocks.

Presumably before considering any/most CODEC bindings complete, we need to make a similar change?

author maintainer
#5 lore raw
Quoted 8 lines · Stephen Warren
Quoted 3 lines · Mark Brown

Due to the variable availability of the clock API there is no code in the driver to use these at present, for the time being the machine drivers will need to handle requesting clocks.

Presumably before considering any/most CODEC bindings complete, we need to make a similar change?

Yeah, ideally. I was going to go through the ones I know about at some point. On the other hand it's not really a big deal given how far off we are being able to rely on the clock API and we still need to work out what to do with hooking the audio buses in too.