[RFC][PATCH 2/2 v3] ASoC: simple-card: add Device Tree support
Stephen Warren
swarren at wwwdotorg.org
Tue Feb 5 09:22:21 EST 2013
On 01/31/2013 06:05 PM, Kuninori Morimoto wrote:
>
> Hi Stephen, Mark
>
>>> +- simple-audio,dai-name : simple-audio CPU/CODEC DAI name
>>
>> OK, I see those two are CPU-/CODEC-specific. However, you could easily
>> just have different property names for the two.
>>
>> I assume you didn't like my idea of not putting the DAI names into the
>> DT, but using extra arguments after the phandles instead? Doing so would
>> be more alike most existing DT bindings.
>
> The reason why I need "dai-name" is that phandle can select "cpu/codec device"
> itself, but, it can't select "port".
> This port is called/controlled as "xxx_dai_name" on ASoC I think.
>
> like this
>
> +-------------+
> | FSI port A |--> ak4642
> | port B |--> HDMI
> +-------------+
>
> Then, I would like to ask Stephen, Mark
Yes it can.
In most DT bindings where phandles are used, you specify both a phandle
and some arguments related to that phandle. The arguments could easily
encode the port ID. In other words, instead of:
simple-audio,codec = <&phandle>;
you could write:
simple-audio,codec = <&phandle PORT_NUMBER>;
where PORT_NUMBER could be 0, 1, 2, or any other integer value or
sequence of integer values, which the driver for the CODEC would
interpret itself, and return an ASoC-internal port name.
More information about the devicetree-discuss
mailing list