linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: p.zabel@pengutronix.de (Philipp Zabel)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v8] reset: Add driver for gpio-controlled reset pins
Date: Tue, 16 Jul 2013 11:49:26 +0200	[thread overview]
Message-ID: <1373968166.4327.11.camel@pizza.hi.pengutronix.de> (raw)
In-Reply-To: <20130716041056.GA30067@S2101-09.ap.freescale.net>

Hi Shawn,

Am Dienstag, den 16.07.2013, 12:10 +0800 schrieb Shawn Guo:
> On Mon, Jul 15, 2013 at 09:35:52PM -0600, Stephen Warren wrote:
> > > It's a little bit late to register gpio-reset driver at module_init
> > > time, because gpio-reset provides reset control via gpio for other
> > > devices which are mostly probed at module_init time too.  And it
> > > becomes even worse, when the gpio comes from IO expander on I2C bus,
> > > e.g. pca953x.  In that case, gpio-reset needs to be ready before I2C
> > > bus driver which is generally ready at subsys_initcall time.  Let's
> > > register gpio-reset driver in arch_initcall() to have it ready early
> > > enough.
> > 
> > There's no need for the reset driver to be registered before its users;
> > the users of the reset GPIO will simply have their probe deferred until
> > the reset controller is available, and then everything will work out
> > just fine.
> > 
> > > The defer probe mechanism is not used here, because a reset controller
> > > driver should be reasonably registered early than other devices.  More
> > > importantly, defer probe doe not help in some nasty cases, e.g. the
> > > gpio-pca953x device itself needs a reset from gpio-reset driver to start
> > > working.
> > 
> > That should work fine with deferred probe.
> 
> I should probably rework the commit log.  But I do not see a problem
> to register gpio-reset driver a little bit earlier.  On the other hand,
> if we reply on deferred probe, many drivers probe could be deferred.
> For example, on my system, the gpio-pca953x on I2C bus works as a GPIO
> controller and provides resets to many board level components.
> Deferring probe of gpio-pca953x on I2C bus means every single probe of
> all these components gets deferred.  IMO, this situation should be
> reasonably avoided.

so you want to have gpio-reset probed at arch_initcall time and you have
gpio-pca953x probed at subsys_initcall time. Won't then all gpio-reset
devices that use gpios on pca953x to reset other peripherals need to be
deferred?

regards
Philipp

  reply	other threads:[~2013-07-16  9:49 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-30  9:09 [PATCH v8] reset: Add driver for gpio-controlled reset pins Philipp Zabel
2013-05-30 10:37 ` Pavel Machek
2013-07-16  1:50 ` Shawn Guo
2013-07-16  3:35   ` Stephen Warren
2013-07-16  4:10     ` Shawn Guo
2013-07-16  9:49       ` Philipp Zabel [this message]
2013-07-16 12:56         ` Shawn Guo
2013-07-16 15:45       ` Stephen Warren
2013-07-17  3:02         ` Shawn Guo
2013-07-17 16:57           ` Stephen Warren
2013-07-17 21:38             ` Pavel Machek
2013-07-17 22:24               ` Stephen Warren
2013-07-18 11:25                 ` Pavel Machek
2013-07-18 18:45                   ` Olof Johansson
2013-07-19  3:23                     ` Shawn Guo
2013-07-19 15:45                       ` Stephen Warren
2013-07-22  7:47                         ` Shawn Guo
2013-07-26 10:26                     ` Philipp Zabel
2013-07-18 22:55                   ` Grant Likely
2013-07-18 22:50             ` Grant Likely
2013-07-16  9:59     ` Philipp Zabel
2013-07-16 15:48       ` Stephen Warren
2013-07-16  6:51   ` Shawn Guo
2013-07-16  9:51     ` Philipp Zabel
2013-07-16 12:15       ` Shawn Guo
2013-07-16 15:47     ` Stephen Warren
2013-07-17  3:43       ` Shawn Guo
2013-07-17  7:17       ` Philipp Zabel

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=1373968166.4327.11.camel@pizza.hi.pengutronix.de \
    --to=p.zabel@pengutronix.de \
    --cc=linux-arm-kernel@lists.infradead.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).