On 12/10/2011 05:49 AM, Mark Brown wrote:
On Fri, Dec 09, 2011 at 01:52:00PM -0800, Stephen Warren wrote:
I'd originally made this property specific to the Tegra+WM8903 machine driver, and you'd asked me to make it generic. Is there room to use the binding above for the Tegra+WM8903 machine driver only, in order to get the driver converted to DT, then define/implement something completely generic to replace it, i.e. the stuff below?
I was asking for the code to be generic, not the binding itself. If the code could for example take a property name as an argument that'd allow other bindings to use the same code without having to have a generic binding which has bits which depend strongly on some Linux specific machine driver.
Ah right, I misunderstood then.
So, does the following sound reasonable:
Add:
snd_soc_of_parse_card_name(struct snd_soc_card *card, const char *prop);
.. and have the machine driver call that whenever it decides, rather than having e.g. snd_soc_register_card() call it.
Add:
int snd_soc_of_parse_audio_routing(struct snd_soc_card *card, const char *prop);
.. and have the machine driver call that whenever it decides, rather than having e.g. snd_soc_register_card() call it.
Remove Documentation/devicetree/bindings/sound/embedded-audio-complex.txt from the patches completely, and document the properties solely in the Tegra+WM8903 machine driver binding; we can write embedded-audio-complex.txt if we create a truly generic ASoC driver binding.
Does that sound reasonable?
Thanks.