[PATCH 3/3 v5] ASoC: simple-card: add Device Tree support

Stephen Warren swarren at wwwdotorg.org
Thu Feb 14 10:36:13 EST 2013


On 02/12/2013 06:13 PM, Kuninori Morimoto wrote:
> 
> Hi Stephen
> 
>>> +- simple-audio,[prefix],bitclock-inversion	: if CPU/CODEC needs clock inversion
>>> +- simple-audio,[prefix],frame-inversion		: if CPU/CODEC needs frame inversion
>>> +- simple-audio,[prefix],system-clock-frequency	: system clock rate for each CPU/CODEC
>>
>> I know Mark had a preference to store DAI-specific data in sub-nodes
>> rather than using this "[prefix]" thing... If that doesn't end up
>> happening though, rather than "[prefix],", I think it'd be more typical
>> to use "[prefix]-" since I've never seen a DT property name with two
>> ","; "-" is typically used as the word separator in DT property names.
> 
> Hmm...
> If I can use sub-node, I can use below style for getting dai name ?
> I guess it is easy/simple, but, what do you think about this ?
> 
> sound {
> 	ak4642-hifi {

If you want the "simple-audio" binding and driver to be completely
generic, you had better name this node something generic like "codec".

> 		simple-audio,codec;

Then, you wouldn't need that property to identify what type of child
node this is.

> 		simple-audio,dev = <&ak4642>;

Make that value <&ak4642 0> in order to select which AK4642 port you
want to connect.

> 		...
> 	}
> 	fsia-dai {

Name this node something generic like "CPU".

> 		simple-audio,cpu;
> 		simple-audio,dev = <&sh_fsi2>;
> 		...
> 	}
> }


More information about the devicetree-discuss mailing list