linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Grant Likely <grant.likely@secretlab.ca>
To: Tabi Timur-B04825 <B04825@freescale.com>
Cc: "dbaryshkov@gmail.com" <dbaryshkov@gmail.com>,
	"devicetree-discuss@lists.ozlabs.org Discuss"
	<devicetree-discuss@lists.ozlabs.org>,
	"linuxppc-dev@lists.ozlabs.org list"
	<linuxppc-dev@lists.ozlabs.org>
Subject: Re: issues calling of_platform_bus_probe() twice
Date: Sun, 18 Mar 2012 18:22:07 +0000	[thread overview]
Message-ID: <20120318182207.627573E07BF@localhost> (raw)
In-Reply-To: <4F6609DE.2050001@freescale.com>

On Sun, 18 Mar 2012 16:14:23 +0000, Tabi Timur-B04825 <B04825@freescale.com> wrote:
> Grant Likely wrote:
> > That's because you're using it wrong.  of_platform_bus_probe() creates
> > platform devices at the starting level and every level below it as
> > described by the bus ids.  It is illegal to call of_platform_bus_probe()
> > twice at the same level in the DT.
> 
> Well, *I* am not using it wrong.  Notice that my patch fixes (or works 
> around) the commit that *did* do it wrong:
> 
> http://patchwork.ozlabs.org/patch/126289/

Fair enough; I just wanted to point out that there it can only dig as
deep into the tree as is specified by the bus ids.  The exact problem
wasn't calling the function twice, but rather trying to call the
function twice from the same level of the tree.

BTW, I also recommend moving to of_platform_populate() for new code.
I think the behaviour is more consistent for fdt platforms and it
is more convenient for devices that are children of the root.

g.

      reply	other threads:[~2012-03-18 18:22 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-16 21:21 issues calling of_platform_bus_probe() twice Kumar Gala
2012-03-16 21:23 ` Benjamin Herrenschmidt
2012-03-17  7:27   ` Grant Likely
2012-03-17 13:35     ` Tabi Timur-B04825
2012-03-17 23:29       ` Benjamin Herrenschmidt
2012-03-17 23:33         ` Tabi Timur-B04825
2012-03-18  9:08       ` Grant Likely
2012-03-18 16:14         ` Tabi Timur-B04825
2012-03-18 18:22           ` Grant Likely [this message]

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=20120318182207.627573E07BF@localhost \
    --to=grant.likely@secretlab.ca \
    --cc=B04825@freescale.com \
    --cc=dbaryshkov@gmail.com \
    --cc=devicetree-discuss@lists.ozlabs.org \
    --cc=linuxppc-dev@lists.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).