public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: David Brownell <david-b@pacbell.net>
To: jamey.hicks@hp.com
Cc: Linux Kernel list <linux-kernel@vger.kernel.org>
Subject: Re: recursive call to platform_device_register deadlocks
Date: Sat, 18 Jun 2005 09:06:13 -0700	[thread overview]
Message-ID: <200506180906.13522.david-b@pacbell.net> (raw)


> We could restructure the toplevel driver so that it does not call 
> platform_device inside its probe function.  An alternative would be to 
> add a pointer to a vector of subdevices to platform_device and have it 
> register the subdevices after it has probed the toplevel device.  Do you 
> have any recommendations?

Other busses have taken the former approach... the toplevel bit
being more like a bridge/hub than anything else, and the children
appearing later through some dynamic scan/hotplug.  That vector
could be used to implement such a "scan", triggered sometime after
the bridge/hub driver returns from probe(), avoiding both that
driver core deadlock and recursion during probe().

I think the SPI stack will have similar issues.  There it'll be
typical that configurations be static board-specific ones ... not
so dissimilar from configurations involving board-specific ASICs.
An SOC may have several SPI controllers, with their own chipselects,
and different boards will have different chips (like serial flash,
sensors, DAC/ADC, etc) on each chipselect.  Unlike busses designed
for hotplug, those chips won't always self-identify; a dynamic
scan won't generally behave.

Some model that makes it easy to declare static sections of the
device tree, and which is easily applied to other bus types, would
be a good thing.  Like maybe that "alternative" you sketched.

- Dave


             reply	other threads:[~2005-06-18 16:06 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-06-18 16:06 David Brownell [this message]
  -- strict thread matches above, loose matches on Subject: below --
2005-06-18 14:39 recursive call to platform_device_register deadlocks Jamey Hicks
2005-06-19  5:59 ` Greg KH
2005-06-20 13:26   ` Jamey Hicks
2005-06-21 13:55   ` Jamey Hicks
2005-06-21  7:43 ` Russell King

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=200506180906.13522.david-b@pacbell.net \
    --to=david-b@pacbell.net \
    --cc=jamey.hicks@hp.com \
    --cc=linux-kernel@vger.kernel.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