All of lore.kernel.org
 help / color / mirror / Atom feed
From: Bill Gatliff <bgat@billgatliff.com>
To: Paul Mundt <lethal@linux-sh.org>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>,
	Linux/PPC Development <linuxppc-dev@ozlabs.org>,
	linux-embedded <linux-embedded@vger.kernel.org>
Subject: Re: A better way to sequence driver initialization?
Date: Sat, 10 Apr 2010 20:31:31 -0500	[thread overview]
Message-ID: <4BC12673.2090602@billgatliff.com> (raw)
In-Reply-To: <20100410233909.GA16099@linux-sh.org>

Paul Mundt wrote:
>
> In cases where you can specifically note that dependencies, doing so will
> save you a world of pain. Despite that, it's simply not possible to do
> this as a free-for-all. Devices or busses that can tolerate multi-threaded
> probing need to be converted over one at a time, but even then you still
> need the dependency tracking for those that depend on link order today.
>   

Right now I'm thinking mostly about GPIO devices which need to register
before things like gpio-leds can use them.  Sometimes the GPIO expansion
chip of interest is on i2c, other times it's spi, and still others it's
a platform or USB device.  Linking the gpio-led driver late helps that
specific situation.

But what about when I want to use a pin on a GPIO expansion device as
the card-detect for an MMC slot?  Or, as I've just recently noticed in
one hardware platform I'm working on, using a pin on a SPI GPIO expander
as a chip-select for another SPI device, but through gpiolib? 
Eventually, the dependencies don't become circular but changing the link
order will break some and fix others.  Ugh.

Definitely, a free-for-all isn't going to work.  But I don't think that
having every driver do its own kthread_run() is a solution, either. 
I'll keep tinkering.  :)


b.g.

-- 
Bill Gatliff
bgat@billgatliff.com

WARNING: multiple messages have this Message-ID (diff)
From: Bill Gatliff <bgat@billgatliff.com>
To: Paul Mundt <lethal@linux-sh.org>
Cc: linux-embedded <linux-embedded@vger.kernel.org>,
	Linux/PPC Development <linuxppc-dev@ozlabs.org>
Subject: Re: A better way to sequence driver initialization?
Date: Sat, 10 Apr 2010 20:31:31 -0500	[thread overview]
Message-ID: <4BC12673.2090602@billgatliff.com> (raw)
In-Reply-To: <20100410233909.GA16099@linux-sh.org>

Paul Mundt wrote:
>
> In cases where you can specifically note that dependencies, doing so will
> save you a world of pain. Despite that, it's simply not possible to do
> this as a free-for-all. Devices or busses that can tolerate multi-threaded
> probing need to be converted over one at a time, but even then you still
> need the dependency tracking for those that depend on link order today.
>   

Right now I'm thinking mostly about GPIO devices which need to register
before things like gpio-leds can use them.  Sometimes the GPIO expansion
chip of interest is on i2c, other times it's spi, and still others it's
a platform or USB device.  Linking the gpio-led driver late helps that
specific situation.

But what about when I want to use a pin on a GPIO expansion device as
the card-detect for an MMC slot?  Or, as I've just recently noticed in
one hardware platform I'm working on, using a pin on a SPI GPIO expander
as a chip-select for another SPI device, but through gpiolib? 
Eventually, the dependencies don't become circular but changing the link
order will break some and fix others.  Ugh.

Definitely, a free-for-all isn't going to work.  But I don't think that
having every driver do its own kthread_run() is a solution, either. 
I'll keep tinkering.  :)


b.g.

-- 
Bill Gatliff
bgat@billgatliff.com

  parent reply	other threads:[~2010-04-11  1:31 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-04-09 19:23 A better way to sequence driver initialization? Bill Gatliff
2010-04-10  3:54 ` Bill Gatliff
2010-04-10  3:59   ` Bill Gatliff
2010-04-10  4:19     ` Bill Gatliff
2010-04-10  5:29 ` Grant Likely
2010-04-10  5:29   ` Grant Likely
2010-04-10 13:56   ` Bill Gatliff
2010-04-10  8:53 ` Benjamin Herrenschmidt
2010-04-10 13:35   ` Bill Gatliff
2010-04-10 23:39     ` Paul Mundt
2010-04-10 23:39       ` Paul Mundt
2010-04-10 23:47       ` Grant Likely
2010-04-10 23:47         ` Grant Likely
2010-04-11  1:33         ` Bill Gatliff
2010-04-11  1:33           ` Bill Gatliff
2010-04-11  1:47           ` Paul Mundt
2010-04-11  1:47             ` Paul Mundt
2010-04-11  3:30             ` Bill Gatliff
2010-04-11  3:30               ` Bill Gatliff
2010-04-11  1:31       ` Bill Gatliff [this message]
2010-04-11  1:31         ` Bill Gatliff
2010-04-11  7:26         ` Benjamin Herrenschmidt
2010-04-11  7:26           ` Benjamin Herrenschmidt
2010-04-11  7:18       ` Benjamin Herrenschmidt
2010-04-11  7:18         ` Benjamin Herrenschmidt
2010-04-11  7:15     ` 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=4BC12673.2090602@billgatliff.com \
    --to=bgat@billgatliff.com \
    --cc=benh@kernel.crashing.org \
    --cc=lethal@linux-sh.org \
    --cc=linux-embedded@vger.kernel.org \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.