Skip to contentSkip to conversation

ASoC: dt: Move WM8903 pin list from Tegra board binding to CODEC binding

PATCH In review Mark Brown 2 participants 5 messages Aug 7, 2013

Subsystems (4)
lore
Share & tools
lore

Mark Brown

author maintainer
#0 lore raw

PATCH 1/1 ASoC: dt: Move WM8903 pin list from Tegra board binding to CODEC binding

From: Mark Brown <[email protected]>

The pin list is the same for any board using the CODEC.

---
 .../bindings/sound/nvidia,tegra-audio-wm8903.txt   | 22 ++--------------------
 Documentation/devicetree/bindings/sound/wm8903.txt | 19 +++++++++++++++++++
 2 files changed, 21 insertions(+), 20 deletions(-)
Documentation/devicetree/bindings/sound/nvidia,tegra-audio-wm8903.txt +2 -20
index 3bf722d..0efe58c 100644
@@ -11,26 +11,8 @@ Required properties:
 - nvidia,audio-routing : A list of the connections between audio components.
   Each entry is a pair of strings, the first being the connection's sink,
   the second being the connection's source. Valid names for sources and
-  sinks are the WM8903's pins, and the jacks on the board:
-
-  WM8903 pins:
-
-  * IN1L
-  * IN1R
-  * IN2L
-  * IN2R
-  * IN3L
-  * IN3R
-  * DMICDAT
-  * HPOUTL
-  * HPOUTR
-  * LINEOUTL
-  * LINEOUTR
-  * LOP
-  * LON
-  * ROP
-  * RON
-  * MICBIAS
+  sinks are the WM8903's pins (documented in the WM8903 binding document),
+  and the jacks on the board:
 
   Board connectors:
 
Documentation/devicetree/bindings/sound/wm8903.txt +19 -0
index f102cbc..94ec32c 100644
@@ -28,6 +28,25 @@ Optional properties:
     performed. If any entry has the value 0xffffffff, that GPIO's
     configuration will not be modified.
 
+Pins on the device (for linking into audio routes):
+
+  * IN1L
+  * IN1R
+  * IN2L
+  * IN2R
+  * IN3L
+  * IN3R
+  * DMICDAT
+  * HPOUTL
+  * HPOUTR
+  * LINEOUTL
+  * LINEOUTR
+  * LOP
+  * LON
+  * ROP
+  * RON
+  * MICBIAS
+
 Example:
 
 codec: wm8903@1a {
Signature · 1 line
1.8.4.rc1
#1 lore raw
Quoted 7 lines · Mark Brown

From: Mark Brown <[email protected]>

The pin list is the same for any board using the CODEC.

Documentation/devicetree/bindings/sound/nvidia,tegra-audio-wm8903.txt +0 -0
 
   the second being the connection's source. Valid names for sources and

...

Documentation/devicetree/bindings/sound/nvidia,tegra-audio-wm8903.txt Required properties: · line 17

Quoted 4 lines
Documentation/devicetree/bindings/sound/nvidia,tegra-audio-wm8903.txt +2 -0
+  sinks are the WM8903's pins (documented in the WM8903 binding document),
+  and the jacks on the board:
 
   Board connectors:

Probably want to remove the line "Board connectors:" ?

Documentation/devicetree/bindings/sound/wm8903.txt Optional properties: · line 34

Quoted 6 lines
Documentation/devicetree/bindings/sound/wm8903.txt +4 -0
 
+Pins on the device (for linking into audio routes):
+
+  * IN1L
+  * IN1R

I thought all the pins were going to be assigned numbers too so that bindings could use either?

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

From: Mark Brown <[email protected]>

Documentation/devicetree/bindings/sound/nvidia,tegra-audio-wm8903.txt +0 -0
Quoted 8 lines
Quoted 1 line

the second being the connection's source. Valid names for sources and

...

Documentation/devicetree/bindings/sound/nvidia,tegra-audio-wm8903.txt Required properties: · line 17

Quoted 4 lines
Documentation/devicetree/bindings/sound/nvidia,tegra-audio-wm8903.txt +2 -0
+  sinks are the WM8903's pins (documented in the WM8903 binding document),
+  and the jacks on the board:
 
   Board connectors:

Probably want to remove the line "Board connectors:" ?

The board is still defining some jacks.

Quoted 9 lines

Documentation/devicetree/bindings/sound/wm8903.txt Optional properties: · line 34

Quoted 6 lines
Documentation/devicetree/bindings/sound/wm8903.txt +4 -0
 
+Pins on the device (for linking into audio routes):
+
+  * IN1L
+  * IN1R

I thought all the pins were going to be assigned numbers too so that bindings could use either?

I think someone who wants to start using those should get to pick numbers they find pleasing :) More to the point it's more effort and I'd like to see it in action to see the nicest way to write it up - create a header and refer to it or just put it in the docs and have the numbers assigned with new DAPM widget types embedding the numbers for example?

#3 lore raw
Quoted 10 lines · Mark Brown
Quoted 9 lines · Stephen Warren
Quoted 8 lines · Mark Brown

From: Mark Brown <[email protected]>

diff --git a/Documentation/devicetree/bindings/sound/nvidia,tegra-audio-wm8903.txt b/Documentation/devicetree/bindings/sound/nvidia,tegra-audio-wm8903.txt

the second being the connection's source. Valid names for sources and

Quoted 7 lines
Quoted 7 lines

...

Quoted 4 lines

+ sinks are the WM8903's pins (documented in the WM8903 binding document), + and the jacks on the board:

Board connectors:

Probably want to remove the line "Board connectors:" ?

What I mean is that there's only 1 list of the jacks now, and that's already introduced by the trailing colon you added in the line "+ and the jacks on the board:".

Quoted 11 lines

The board is still defining some jacks.

Quoted 8 lines
Quoted 5 lines
Documentation/devicetree/bindings/sound/wm8903.txt +1 -0
 
+Pins on the device (for linking into audio routes): + +  *

IN1L + * IN1R

I thought all the pins were going to be assigned numbers too so that bindings could use either?

Quoted 6 lines

I think someone who wants to start using those should get to pick numbers they find pleasing :) More to the point it's more effort and I'd like to see it in action to see the nicest way to write it up - create a header and refer to it or just put it in the docs and have the numbers assigned with new DAPM widget types embedding the numbers for example?

I suppose it's fine to add that later. That rather encourages people to think that only strings are acceptable for identifying the pins though, which I'd rather avoid, but I guess it's fine.

author maintainer
#4 lore raw
Quoted 7 lines · Stephen Warren
Quoted 1 line · Mark Brown
Quoted 1 line

Probably want to remove the line "Board connectors:" ?

What I mean is that there's only 1 list of the jacks now, and that's already introduced by the trailing colon you added in the line "+ and the jacks on the board:".

Hrm, I guess.

Quoted 3 lines

I suppose it's fine to add that later. That rather encourages people to think that only strings are acceptable for identifying the pins though, which I'd rather avoid, but I guess it's fine.

Practically speaking that's the only option right now, actually doing a numbers based binding isn't sensible without infrastructure work to look things up and it's not particularly reasonable to insist that people do so.