linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: Grant Likely <grant.likely@secretlab.ca>
Cc: linuxppc-dev@ozlabs.org
Subject: Re: [PATCH 2 6/7] Uartlite: Add of-platform-bus binding
Date: Thu, 04 Oct 2007 07:21:40 +1000	[thread overview]
Message-ID: <1191446500.22572.94.camel@pasglop> (raw)
In-Reply-To: <fa686aa40710030739k13e05571l7063aa635a8727dc@mail.gmail.com>


On Wed, 2007-10-03 at 08:39 -0600, Grant Likely wrote:
> Right, okay.  Looking at platform_device_add(), the default parent is
> platform_bus, but it can be overridden.  of_platform_bus devices get
> the hierarchy of the device tree by default.  So in the platform bus
> case, the constructor would need to explicitly set the parent device?
> Correct?
> 
> Also, how do you see the constructor code getting executed?  Called
> explicitly from the platform code, or some form of auto binding?  I
> look at fsl_soc.c and I shudder as each constructor does a pass of the
> whole tree looking for compatible nodes.

My idea was to have some platform code at boot walk the DT and call the
constructors on the way, passing them the parent. Constructors return a
struct device * so it would keep track of who is where.

Drivers or platform code can then register constructors along with of
match tables.

Ben.
 

  reply	other threads:[~2007-10-03 21:23 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-09-30 22:41 [PATCH 2 1/7] Uartlite: Fix reg io to access documented register size Grant Likely
2007-09-30 22:41 ` [PATCH 2 2/7] Uartlite: change name of ports to ulite_ports Grant Likely
2007-10-02 18:46   ` Peter Korsgaard
2007-09-30 22:41 ` [PATCH 2 3/7] Uartlite: Add macro for uartlite device name Grant Likely
2007-10-02 18:45   ` Peter Korsgaard
2007-09-30 22:41 ` [PATCH 2 4/7] Uartlite: Separate the bus binding from the driver proper Grant Likely
2007-09-30 22:42 ` [PATCH 2 5/7] Uartlite: Comment block tidy Grant Likely
2007-10-02 18:46   ` Peter Korsgaard
2007-09-30 22:42 ` [PATCH 2 6/7] Uartlite: Add of-platform-bus binding Grant Likely
2007-10-02  5:53   ` Benjamin Herrenschmidt
2007-10-02 14:26     ` Grant Likely
2007-10-02 15:58       ` Peter Korsgaard
2007-10-02 16:10         ` Scott Wood
2007-10-02 16:23           ` Grant Likely
2007-10-02 16:10         ` Grant Likely
2007-10-02 22:43           ` Benjamin Herrenschmidt
2007-10-03  4:18             ` Grant Likely
2007-10-03  4:24               ` Benjamin Herrenschmidt
2007-10-03 14:39                 ` Grant Likely
2007-10-03 21:21                   ` Benjamin Herrenschmidt [this message]
2007-10-02 18:49   ` Peter Korsgaard
2007-09-30 22:42 ` [PATCH 2 7/7] Uartlite: Let the console be initialized earlier Grant Likely
2007-10-02 18:48   ` Peter Korsgaard

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=1191446500.22572.94.camel@pasglop \
    --to=benh@kernel.crashing.org \
    --cc=grant.likely@secretlab.ca \
    --cc=linuxppc-dev@ozlabs.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;
as well as URLs for NNTP newsgroup(s).