Devicetree
 help / color / mirror / Atom feed
From: David Gibson <david-xT8FGy+AXnRB3Ne2BGzF6laj5H9X9Tb+@public.gmane.org>
To: Jon Smirl <jonsmirl-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Cc: Benjamin Herrenschmidt
	<benh-XVmvHMARGAS8U2dJNN8I7kB+6BGkLq7r@public.gmane.org>,
	devicetree-discuss-mnsaURCQ41sdnm+yROfE0A@public.gmane.org,
	linuxppc-dev
	<linuxppc-dev-mnsaURCQ41sdnm+yROfE0A@public.gmane.org>
Subject: Re: Board level compatibility matching
Date: Fri, 1 Aug 2008 14:25:05 +1000	[thread overview]
Message-ID: <20080801042505.GK5008@yookeroo.seuss> (raw)
In-Reply-To: <9e4733910807312100j6a8d1974k34054c2d69f417f4-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>

On Fri, Aug 01, 2008 at 12:00:01AM -0400, Jon Smirl wrote:
> On 7/31/08, David Gibson <david-xT8FGy+AXnRB3Ne2BGzF6laj5H9X9Tb+@public.gmane.org> wrote:
> > On Thu, Jul 31, 2008 at 11:06:20PM -0400, Jon Smirl wrote:
> >  > On 7/31/08, David Gibson <david-xT8FGy+AXnRB3Ne2BGzF6laj5H9X9Tb+@public.gmane.org> wrote:
[snip]
> >  > That is what I'm doing now. But it requires every board to add a file
> >  > to arch/powerpc/platforms.  Can we have some common code to make the
> >  > fabric device? Can it be an OF device instead of a platform one? An OF
> >  > device could be compatible with boardname-fabric, generic-fabric. That
> >  > allows a stub fabric driver to always bind.
> >
> >
> > There are several ways to do this, and which is the most sensible
> >  depends on the specific design, and whether / how many boards the
> >  design is shared amongst.
> >
> >  In some cases it's suitable to have a "fake" device node for the sound
> >  wiring, to which a fabric driver can bind.  I think I've argued
> >  against this approach in the past, but I've since been convinced that
> >  it is a reasonable approach for some situations.  There's precedent,
> >  too, a number of Apple device trees do this.
> >
> >  In other cases it may be possible to deduce the correct fabric driver
> >  from the interconnections of individual sound components.
> >
> >  In yet others, we need board-specific platform code to instantiate the
> >  fabric driver.  In some cases that's simply the most straightforward
> >  way to do things.  In others it's not ideal, but we can use it as a
> >  fallback technique because deployed device trees simply don't have
> >  sufficient information in other places to use another approach.
> >
> >  There doesn't have to be One True Method for doing this.
> 
> We're running into a need for the true method. With ALSA you need to
> have the codec driver, i2s/ac97 driver and the fabric driver all load
> and say here I am before ALSA can finish binding. ALSA won't complete
> initializing on boards without all three.
> 
> So what do you do on board that doesn't need a fabric driver? That's
> why you want the fake device with the compatible string =
> board-fabric, noop-fabric. Now you know for sure one of those two
> drivers will bind.

No... that would be exactly my example of a case where instantiating
the fabric driver from the platform code isn't ideal, but is a usable
fallback option.

> Why does the fake fabric device need to be in the device tree? Can't
> we just dynamically create it as part of the boot process?

Um.. yes.. that would be exactly what instatiating it from the
platform code does.

-- 
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

  parent reply	other threads:[~2008-08-01  4:25 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-07-31 20:19 Board level compatibility matching Grant Likely
2008-07-31 20:39 ` Chris Friesen
     [not found] ` <fa686aa40807311319k44d270b0t4fa9cb0e6523339-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2008-07-31 20:49   ` Jon Smirl
2008-07-31 20:52     ` Grant Likely
     [not found]       ` <20080731205251.GB29834-s3s/WqlpOiPyB63q8FvJNQ@public.gmane.org>
2008-07-31 20:58         ` Jon Smirl
     [not found]           ` <9e4733910807311358k54b5c088l1023d354fd0ad28e-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2008-08-01  2:47             ` David Gibson
     [not found]               ` <20080801024729.GA5008-787xzQ0H9iRg7VrjXcPTGA@public.gmane.org>
2008-08-01  3:06                 ` Jon Smirl
     [not found]                   ` <9e4733910807312006l8e83d27qe1b5ca5f50b89e39-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2008-08-01  3:30                     ` David Gibson
     [not found]                       ` <20080801033009.GG5008-787xzQ0H9iRg7VrjXcPTGA@public.gmane.org>
2008-08-01  4:00                         ` Jon Smirl
     [not found]                           ` <9e4733910807312100j6a8d1974k34054c2d69f417f4-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2008-08-01  4:25                             ` David Gibson [this message]
2008-08-01  4:37                               ` Jon Smirl
2008-08-01  6:22                                 ` David Gibson
2008-07-31 20:59   ` Scott Wood
     [not found]     ` <20080731205906.GB17718-VKaLA/mbEU932VTgPCOETVjVikpgYyvb5NbjCUgZEJk@public.gmane.org>
2008-07-31 21:09       ` Grant Likely
2008-08-01  2:54 ` David Gibson
2008-08-01  3:25   ` Grant Likely
2008-08-01  3:38     ` David Gibson
2008-08-01  4:25     ` Benjamin Herrenschmidt
2008-08-01 12:06       ` Josh Boyer
     [not found]         ` <20080801080632.35edcb04-jnIq6iUNB1CO8iYQgJmm/0EOCMrvLtNR@public.gmane.org>
2008-08-01 12:28           ` Josh Boyer
2008-08-01 14:30         ` Grant Likely
2008-08-01 22:48         ` Benjamin Herrenschmidt
2008-08-02  0:07           ` Josh Boyer
2008-08-01 14:27       ` Grant Likely
2008-08-01 15:11         ` Josh Boyer
2008-08-01 16:01           ` M. Warner Losh
2008-08-01 16:24             ` Grant Likely
2008-08-01 22:54         ` Benjamin Herrenschmidt

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20080801042505.GK5008@yookeroo.seuss \
    --to=david-xt8fgy+axnrb3ne2bgzf6laj5h9x9tb+@public.gmane.org \
    --cc=benh-XVmvHMARGAS8U2dJNN8I7kB+6BGkLq7r@public.gmane.org \
    --cc=devicetree-discuss-mnsaURCQ41sdnm+yROfE0A@public.gmane.org \
    --cc=jonsmirl-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=linuxppc-dev-mnsaURCQ41sdnm+yROfE0A@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox