On 10/24/07, Timur Tabi <[EMAIL PROTECTED]> 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. [EMAIL PROTECTED] (403) 399-0195 _______________________________________________ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev