[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <51F8302D.406@wwwdotorg.org>
Date: Tue, 30 Jul 2013 15:29:17 -0600
From: Stephen Warren <swarren@...dotorg.org>
To: Mark Brown <broonie@...nel.org>
CC: Richard Genoud <richard.genoud@...il.com>,
Nicolas Ferre <nicolas.ferre@...el.com>,
Liam Girdwood <lgirdwood@...il.com>,
Bo Shen <voice.shen@...el.com>,
Lars-Peter Clausen <lars@...afoo.de>,
linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org,
alsa-devel@...a-project.org, devicetree@...r.kernel.org,
patches@...nsource.wolfsonmicro.com
Subject: Re: [PATCH v6 2/8] ASoC: atmel: machine driver for at91sam9x5-wm8731
boards
On 07/30/2013 02:45 PM, Mark Brown wrote:
> On Tue, Jul 30, 2013 at 11:45:12AM -0600, Stephen Warren wrote:
>> On 07/30/2013 04:32 AM, Richard Genoud wrote:
>
>>> +wm8731 pins: +cf
>>> Documentation/devicetree/bindings/sound/wm8731.txt
>
>> In the Tegra bindings, I deliberately put the list of CODEC pins
>> into the audio complex binding rather than the CODEC binding.
>> That's because
>
> You really shouldn't do this, it's not accomplishing much.
What it accomplishes is not polluting the CODEC's binding with a set
of strings that must always be supported since DT is an ABI. The
strings are isolated into the specific audio complex binding, which
might possibly become deprecated and replaced with something better
and more generic.
>> I'm not sure that in the long-term we want to use strings to
>> identify the CODEC pins, rather than using integers. By putting
>> the list orf CODEC pins in the audio complex binding rather than
>> the CODEC binding, I didn't lumber the CODEC binding with a list
>> of strings that it had to support forever.
>
> How would you create the numbers - you can't use the pin numbers
> since BGA type packages have alphanumeric ball identifiers?
The numbering would be arbitrary, except perhaps for packages that had
simple numeric pin IDs in which case those could be used. There would
be a file in <dt-bindings/audio/...> that defined it, which DTs would
include to create the properties, and CODEC/... drivers would include
and use whenever it needed to identify the pins, e.g. in some kind of
.of_xlate() function.
> Even with numerical pin numbering ou'd need to specify some defines
> for this not to be totally awful at which point you may as well
> have the strings documented since you'd end up writing a table in
> the binding document that's basically a mapping of pin names to
> numbers,
>
>> One reason that strings are problematic is because they can't be
>> mixed with integers/phandles in the same property, so if we ever
>> end up with more generic audio bindings where the routing table
>> is expressed more like:
>
>> audio-routes = <&component_a $a_pin &component_b $b_pin>;
>
>> ... in order to allow completely arbitrary and fully name-spaced
>> routing specification[1], then $a_pin and $b_pin need to be
>> integers not strings.
>
> The above is going to be legibility challenged without defines at
> which point the strings end up appearing in the binding document
> anyway.
Yes, you'd certainly have to use defines not raw integers. The strings
wouldn't appear in the binding doc so much as the numbers.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists