Device trees and audio codecs

Jon Smirl jonsmirl at gmail.com
Mon Oct 22 00:01:43 EST 2007


On 10/21/07, Timur Tabi <timur at freescale.com> wrote:
> > For development purposes I'm using an Efika as a target platform. It
> > is easy enough to load the i2s driver using the device tree. I can add
> > entries to the i2s node to trigger loading of the generic sta9766
> > codec driver. How do I trigger loading the Efika specific fabric
> > driver?
>
> You don't need a device tree entry to trigger loading a driver.  You can just
> load the driver and initialize it in its __init function.
>
> However, in this case, you might want to do what I'm doing -- putting a probe
> function in the fabric driver for the i2s device (which gets its own node
> under the SOC node), and then in that probe function search for all the other
> nodes that you need.

Doing it that way will make the kernel specific to the target device.
Currently I can load the same mpc5200 kernel on several different
target devices since the platform specific code is triggered in the
probe machine phase.

I tried making the fabric driver into a platform driver instead of an
openfirmware driver, but the mpc5200 code is not initializing platform
drivers correctly.

I could insert calls into arch/powerpc/platforms/52xx/whatever to load
the specific asoc fabric, but doing that is a mess. There must be a
way to trigger loading of machine specific drivers

> Since the Apple audio drivers are not ASoC drivers, I suggest we don't pay
> attention to what they do.

Those Apple drivers are very similar to asoc drivers. They could
easily be folded into the asoc code.


-- 
Jon Smirl
jonsmirl at gmail.com



More information about the Linuxppc-dev mailing list