On Wed, 28 Aug 2013 13:44:51 +0200, Sebastian Hesselbarth wrote:Also, we'll need to distinguish between the different audio controllers
on a single SoC, i.e. i2s0 and i2s1. I suggest checking the (phys) reg
base passed.
For what reason does the driver needs to know whether it's the instance
0 or instance 1 ? If it's needed for some specific reason, then there
should probably be something like marvell,i2s-channel-id = <0> and
marvell,i2s-channel-id = <1>.
On Dove, audio1 has SPDIF out, audio0 hasn't. Russell also mentioned to
get rid of "i2s" and use "audio" instead. Most SoC's controllers are
i2s only but as soon as SPDIF comes into play, it is a different
interface protocol.
I am fine with having a "marvell,channel-id" (no "i2s") to discriminate
the instances, although reg offset should be sufficient.
Well, the reg offset is a possibility, but it's not really nice, and
would have to be adapted to each and every SoC even if the reset of the
audio IP is the same.
Though, if the difference between the two units is the availability of
SPDIF support, then we shouldn't encode the channel number, but instead
the availability of SPDIF, i.e:
audio0 {
reg = <... ...>;
compatible = "marvell,kirkwood-audio";
marvell,has-spdif;
};
audio1 {
reg = <... ...>;
compatible = "marvell,kirkwood-audio";
};