From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Message-ID: Date: Wed, 24 Oct 2007 10:52:07 -0600 From: "Grant Likely" Sender: glikely@secretlab.ca To: "Timur Tabi" Subject: Re: Audio codec device tree entries In-Reply-To: <471F75A1.1000909@freescale.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 References: <9e4733910710221859q6ea54810nba58907d5ddd966d@mail.gmail.com> <471F52ED.10007@freescale.com> <9e4733910710240800y24952e70g8c318e35e2e45e2e@mail.gmail.com> <9e4733910710240828x412f598dy7fc4a75faa76358d@mail.gmail.com> <9e4733910710240854y6ac115b6i5e0400eb369fcf7@mail.gmail.com> <471F75A1.1000909@freescale.com> Cc: PowerPC dev list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , On 10/24/07, Timur Tabi wrote: > Grant Likely wrote: > > > Now is probably a good time to mention that there is *nothing* in the > > device tree that enforces a 1:1 relationship between device tree nodes > > and driver instances. Sure, it make sense to register the i2s and > > codec drivers from probing on the i2s and codec nodes. However, there > > is nothing that prevents the codec driver from *also* registering a > > fabric driver based on a property in the codec node or the board-level > > compatible property. > > Wouldn't it make more sense for the fabric driver to register the codec driver? > The fabric driver is the "master" of the other drivers, should it needs to > load and run first. It doesn't really matter. There doesn't need to be a 1:1 relationship between driver instances and device nodes. A probe on one device node can cause the instantiation of both a fabric driver and a codec driver (just put the appropriate calls in the of_platform_bus probe hook). > > > Fabric drivers are codec specific anyway. > > Yes and no. They're really platform-specific, but they should be able to scan > the device tree, determine which codecs are actually on the system, and then > link in the appropriate codec driver. My point is; most likely if you change the codec, you need to change the fabric driver too. There will be many fabric drivers using a single codec, but there will not be many codec drivers using a single fabric. g. -- Grant Likely, B.Sc., P.Eng. Secret Lab Technologies Ltd. grant.likely@secretlab.ca (403) 399-0195