[alsa-devel] [PATCH 5/5] ASoC: mc13783: Add devicetree support
shc_work at mail.ru
Tue Jan 7 08:00:53 CET 2014
On Mon, 6 Jan 2014 15:12:27 +0000
Mark Brown <broonie at kernel.org> wrote:
> > > This is an incompatible binding change; deprecating is fine but it
> > > should still be supported. Is there not a default set of port
> > > assignments that can be used?
> > "fsl,mc13xxx-uses-codec" is not used anywhere and even if it was used,
> > it would not usable, because we can not get to the codec phandle.
> > So I think this change is safe.
> Why would it prevent anything getting the CODEC phandle and what do you
> mean by that anyway? A lack of in tree users shouldn't mean anything,
> we need to be compatible with DTs shipped with boards.
> > > > + pdev->dev.of_node = of_find_node_by_name(pdev->dev.parent->of_node,
> > > > + "codec");
> > > You shouldn't be messing with the of_node in the struct device, this is
> > > managed by the driver model and setting one that wasn't added in sync
> > > with everything else can introduce breakage.
> > Hmm, probably you are right, but I cannot imagine other way to set of_node...
> > Have you other ideas?
> The whole problem is that you're trying to set of_node. Don't do that.
I try to explain my vision of this:
With DT and simple audio codec we should have description like this:
compatible = "simple-audio-card";
sound-dai = <&ssi1>;
sound-dai = <&mc13783codec>;
So, we need codec phandle.
The codec is probed by MC13XXX MFD core, and codec pdev not contain
compatible string, but we should associate our codec with DT.
if ASoC core wants to use codec it will try to find it by of_node.
Maybe my opinion is wrong, fixme.
Alexander Shiyan <shc_work at mail.ru>
More information about the Alsa-devel