On 01/30/2013 06:35 PM, Mark Brown wrote:
On Wed, Jan 30, 2013 at 01:14:07PM -0700, Stephen Warren wrote:
+CPU / CODEC DAI is represented as a sub-node. +Then, sub-node name should be "simple-audio,cpu" or "simple-audio,codec".
Why require sub-nodes? it seem over-complex.
I suggested this because it seemed more legible to repeat the properties by having a named structure for each property rather than by repeating them all with slightly different names.
So the only need to repeat them at all was if the two DAIs needed different values for some of the properties rather than being identical (e.g. signal polarity) or precise inversions (e.g. which end is master), right?
Is that actually likely - I can understand that for e.g. plain old GPIOs board designers might end up sticking random inverters between two devices for various reasons, but surely this wouldn't happen for an I2S interface where the polarities etc. mean something relative to the other signals? I would almost argue that since the simple case is for the signals to be connected 1:1 between the two DAIs, that if a particular board doesn't conform to that, it isn't a simple-audio case. That all said, we could extend simple-audio to handle it still without duplicating everything by specifying the DAI format for the CPU DAI once in the simple-audio node, "inverting" that when configuring the CODEC DAI, and then adding extra boolean properties to the DT later in a backwards-compatible fashion, for any strange cases the driver can end up handling.