From: Stephen Warren <swarren@wwwdotorg.org>
To: Mark Brown <broonie@kernel.org>
Cc: Richard Genoud <richard.genoud@gmail.com>,
Nicolas Ferre <nicolas.ferre@atmel.com>,
Liam Girdwood <lgirdwood@gmail.com>,
Bo Shen <voice.shen@atmel.com>,
Lars-Peter Clausen <lars@metafoo.de>,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org, alsa-devel@alsa-project.org,
devicetree@vger.kernel.org, patches@opensource.wolfsonmicro.com
Subject: Re: [PATCH v6 2/8] ASoC: atmel: machine driver for at91sam9x5-wm8731 boards
Date: Tue, 30 Jul 2013 15:29:17 -0600 [thread overview]
Message-ID: <51F8302D.406@wwwdotorg.org> (raw)
In-Reply-To: <20130730204511.GX9858@sirena.org.uk>
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.
next prev parent reply other threads:[~2013-07-30 21:29 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-07-30 10:32 [PATCH v6 0/8] Sound support for at91sam9x5-wm8731 based boards Richard Genoud
2013-07-30 10:32 ` [PATCH v6 1/8] ASoC: wm8731: add rates constraints Richard Genoud
2013-07-30 11:29 ` Mark Brown
2013-07-30 10:32 ` [PATCH v6 2/8] ASoC: atmel: machine driver for at91sam9x5-wm8731 boards Richard Genoud
2013-07-30 17:45 ` Stephen Warren
2013-07-30 20:45 ` Mark Brown
2013-07-30 21:29 ` Stephen Warren [this message]
2013-07-30 22:58 ` Mark Brown
2013-07-31 22:16 ` Stephen Warren
2013-08-01 9:53 ` Mark Brown
2013-08-06 17:11 ` Mark Brown
2013-08-07 8:20 ` Richard Genoud
2013-07-30 10:32 ` [PATCH v6 3/8] Documentation: DT: update atmel SSC with DMA binding Richard Genoud
2013-08-06 17:12 ` Mark Brown
2013-07-30 10:32 ` [PATCH v6 4/8] ARM: AT91: DTS: sam9x5: add SSC DMA parameters Richard Genoud
2013-07-30 10:32 ` [PATCH v6 5/8] ARM: AT91: DTS: sam9x5ek: add WM8731 codec Richard Genoud
2013-07-30 10:32 ` [PATCH v6 6/8] ARM: AT91: DTS: sam9x5ek: enable SSC Richard Genoud
2013-07-30 10:32 ` [PATCH v6 7/8] ARM: AT91: DTS: sam9x5ek: add sound configuration Richard Genoud
2013-07-30 10:32 ` [PATCH v6 8/8] ASoC: sam9x5: get codec MCLK via device tree Richard Genoud
2013-07-30 12:03 ` Mark Brown
2013-07-30 12:15 ` Richard Genoud
-- strict thread matches above, loose matches on Subject: below --
2013-07-30 9:59 [PATCH v6 0/8] Sound support for at91sam9x5-wm8731 based boards Richard Genoud
2013-07-30 9:59 ` [PATCH v6 2/8] ASoC: atmel: machine driver for at91sam9x5-wm8731 boards Richard Genoud
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=51F8302D.406@wwwdotorg.org \
--to=swarren@wwwdotorg.org \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=lars@metafoo.de \
--cc=lgirdwood@gmail.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=nicolas.ferre@atmel.com \
--cc=patches@opensource.wolfsonmicro.com \
--cc=richard.genoud@gmail.com \
--cc=voice.shen@atmel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).