From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Message-ID: <9e4733910711190851g3e1f2ef9k5f87c7c2dae929ef@mail.gmail.com> Date: Mon, 19 Nov 2007 11:51:03 -0500 From: "Jon Smirl" To: "Grant Likely" Subject: Re: Revisited, audio codec device tree entries. In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 References: <9e4733910711181010q50c08d2ek8413af74d58cf0ce@mail.gmail.com> <4741A56D.9050808@freescale.com> <9e4733910711190800t5dc9bc40q1b58feae4ff364d0@mail.gmail.com> Cc: PowerPC dev list , Timur Tabi List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , On 11/19/07, Grant Likely wrote: > On 11/19/07, Jon Smirl wrote: > > On 11/19/07, Grant Likely wrote: > > > On 11/19/07, Timur Tabi wrote: > > > > Jon Smirl wrote: > > > > > > > > > In the ALSA SOC model the i2s, codec and ac97 drivers are all generic. > > > > > A fabric driver tells specifically how a generic codec is wired into > > > > > the board. What I haven't been able figure out is how to load the > > > > > right fabric driver. > > > > > > > > Do not use the device tree to load the fabric driver! > > > > > > Heh, technically you can't use the device tree to load any device > > > drivers, it's just a data structure. :-) > > > > > > You probably mean "don't use the of_platform bus to load the fabric > > > driver". He still needs to use the data in the device tree to decide > > > what fabric drivers to use. of_platform_bus would be awkward to use > > > for this because the node describing the fabric doesn't cleanly sit on > > > any particular bus (ie. it describes the board; it does not describe > > > the device). > > > > > > In this case; it probably is appropriate to have the platform code > > > instantiate a platform_device for the fabric (instead of an > > > of_platform device) which the fabric driver can bind against. > > > > First, I have platform bus turned off in my builds. Platform bus is a > > place where cruft accumulates that really belongs somewhere else. For > > example when I turned it off I discovered that there was a PC speaker > > driver in my kernel and well as several drivers from 82xx chips. > > > > ALSA creates it own bus like i2c. My fabric driver sits on this bus., > > Kconfig attributes control if it is built-in. I've altered the i2c > > code to look for child device tree nodes and then load the appropriate > > drivers. > > Can't you then instantiate the ALSA bus device in your board platform > code? Then when the driver is registered, the bus should call it's > probe routine. Yes, I can do that. I have just been resisting creating a code linkage from arch/powerpc/platform/xx to sound/alsa/soc/powerpc. I also need to create the fabric driver after alsa has made the bus, subsys_initcall(asoc_bus_init); > -- > Grant Likely, B.Sc., P.Eng. > Secret Lab Technologies Ltd. > grant.likely@secretlab.ca > (403) 399-0195 > -- Jon Smirl jonsmirl@gmail.com