Subject: Re: [PATCH] ASoC drivers for the Freescale MPC8610 SoC

From: David Gibson <[email-masked]>
Date: Thu, 3 Jan 2008 15:44:32 +1100

On Wed, Jan 02, 2008 at 09:29:57AM -0600, Timur Tabi wrote:
> Jon Smirl wrote:
> > On 12/19/07, Timur Tabi <[email-masked]> wrote:
> >>  sound/soc/fsl/fsl_ssi.c                      |  614 +++++++++++++++++++
> >>  sound/soc/fsl/fsl_ssi.h                      |  224 +++++++
> > 
> > I'm confused about this part. You built a driver for the mpc8610 ssi
> > port.  This port has a device tree entry.
> > 
> > +		ssi@16000 {
> > +			compatible = "fsl,ssi";
> > +			cell-index = <0>;
> > +			reg = <16000 100>;
> > +			interrupt-parent = <&mpic>;
> > +			interrupts = <3e 2>;
> > +			fsl,mode = "i2s-slave";
> > +			codec {
> > +				compatible = "cirrus,cs4270";
> > +				/* MCLK source is a stand-alone oscillator */
> > +				bus-frequency = <bb8000>;
> > +			};
> > +		};
> > 
> > But then you don't create an of_platform_driver for this device.
> > Instead you create one for the fabric driver, struct
> > of_platform_driver mpc8610_hpcd_of_driver, and directly link the SSI
> > driver into it.
> 
> That's the best plan I came up with.  This is apparently fixed in ASoC 
> V2.  From ASoC V1's perspective, the fabric driver must be the master. 
> However, it doesn't make sense to have a node in the device tree for the 
> fabric driver, because there is no such "device".  The fabric driver is 
> an abstraction.  So I need to chose some other node to probe the fabric 
> driver with.  I chose the SSI, since each SSI can have only one
> codec.

Instantiating the fabric driver off any node is wrong, precisely
because it is an abstraction.  The fabric driver should be
instantiated by the platform code.

-- 
David Gibson			| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au	| minimalist, thank you.  NOT _the_ _other_
				| _way_ _around_!
http://www.ozlabs.org/~dgibson