Audio codec device tree entries

Jon Smirl jonsmirl at gmail.com
Thu Oct 25 01:19:33 EST 2007


On 10/24/07, Grant Likely <grant.likely at secretlab.ca> wrote:
> On 10/24/07, Timur Tabi <timur at freescale.com> wrote:
> > >       codec0: i2s-codec at 0 {
> > >             compatible = "ti,tas5508";
> > >             reg = <0>;
> > >             i2s-handle = <&i2s at 2000>;
> > >       };
> >
> > I'd do this the other way around -- that is:
> >
> > i2s at 2200 {           // PSC2
> >         compatible = "fsl,mpc5200b-psc-i2s","fsl,mpc5200-psc-i2s";
> >         ...
> >         i2c-handle = <&codec0>;  /* Or something like that */
>
> i2c-handle is a poor property name here.  It should be 'codec-handle'.
>  The codec could theoretically live on just about *any* control bus;
> not just i2c.

That's one of the reasons I put the second option in the post.

In the second option the i2s driver would instantiate first. Next the
generic code would get loaded. The generic codec will know the control
but for the device and it can go look in the i2c node for the address.
i2c node still lists all of the devices on the i2c bus. But the codecs
are in the i2c-handle property so they don't trigger a second loading
of the codec.

A fundamental question is, which bus should trigger the loading of the
generic codec driver. The answer to this determines how the device
tree should look.

I'm using the model that a child node means load the driver and a
reference does not load a driver.

-- 
Jon Smirl
jonsmirl at gmail.com



More information about the Linuxppc-dev mailing list