All of lore.kernel.org
 help / color / mirror / Atom feed
From: jhovold@gmail.com (Johan Hovold)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 2/2] misc: atmel_pwm: set initcall level to subsys
Date: Wed, 30 Oct 2013 12:07:05 +0100	[thread overview]
Message-ID: <20131030110705.GA29813@localhost> (raw)
In-Reply-To: <20131029232249.GA20476@kroah.com>

On Tue, Oct 29, 2013 at 04:22:49PM -0700, Greg KH wrote:
> On Tue, Oct 22, 2013 at 06:32:40PM +0200, Johan Hovold wrote:
> > Even with the atmel_pwm driver and the atmel-pwm-bl backlight driver
> > supporting deferred probing, we still want to make sure that any
> > pwm-device is available when the backlight devices are probed to avoid
> > any unnecessary delays before enabling the backlight.
> > 
> > Signed-off-by: Johan Hovold <jhovold@gmail.com>
> > ---
> >  drivers/misc/atmel_pwm.c | 12 +++++++++++-
> >  1 file changed, 11 insertions(+), 1 deletion(-)
> > 
> > diff --git a/drivers/misc/atmel_pwm.c b/drivers/misc/atmel_pwm.c
> > index a6dc56e..0d0f599 100644
> > --- a/drivers/misc/atmel_pwm.c
> > +++ b/drivers/misc/atmel_pwm.c
> > @@ -395,7 +395,17 @@ static struct platform_driver atmel_pwm_driver = {
> >  	 */
> >  };
> >  
> > -module_platform_driver_probe(atmel_pwm_driver, pwm_probe);
> > +static int __init pwm_init(void)
> > +{
> > +	return platform_driver_probe(&atmel_pwm_driver, pwm_probe);
> > +}
> > +subsys_initcall(pwm_init);
> 
> I really hate this type of patch, as it's papering over the real
> problem.  What happens when someone else moves their driver to this
> level?  Then you are back to the original problem.

Yes, it's crude, but it's currently the only way to express a preferred
probe order.

> This is what deferred probing was supposed to fix.  If it doesn't, then
> something else needs to be done, or fix the deferred probing mess...

Deferred probing (the first patch) fixes the dependency problem, but may
introduce delays. I can live with that.

> Sorry, I can't take this.

Fair enough.

Thanks,
Johan

WARNING: multiple messages have this Message-ID (diff)
From: Johan Hovold <jhovold@gmail.com>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Johan Hovold <jhovold@gmail.com>, Arnd Bergmann <arnd@arndb.de>,
	linux-kernel@vger.kernel.org,
	Nicolas Ferre <nicolas.ferre@atmel.com>,
	linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH 2/2] misc: atmel_pwm: set initcall level to subsys
Date: Wed, 30 Oct 2013 12:07:05 +0100	[thread overview]
Message-ID: <20131030110705.GA29813@localhost> (raw)
In-Reply-To: <20131029232249.GA20476@kroah.com>

On Tue, Oct 29, 2013 at 04:22:49PM -0700, Greg KH wrote:
> On Tue, Oct 22, 2013 at 06:32:40PM +0200, Johan Hovold wrote:
> > Even with the atmel_pwm driver and the atmel-pwm-bl backlight driver
> > supporting deferred probing, we still want to make sure that any
> > pwm-device is available when the backlight devices are probed to avoid
> > any unnecessary delays before enabling the backlight.
> > 
> > Signed-off-by: Johan Hovold <jhovold@gmail.com>
> > ---
> >  drivers/misc/atmel_pwm.c | 12 +++++++++++-
> >  1 file changed, 11 insertions(+), 1 deletion(-)
> > 
> > diff --git a/drivers/misc/atmel_pwm.c b/drivers/misc/atmel_pwm.c
> > index a6dc56e..0d0f599 100644
> > --- a/drivers/misc/atmel_pwm.c
> > +++ b/drivers/misc/atmel_pwm.c
> > @@ -395,7 +395,17 @@ static struct platform_driver atmel_pwm_driver = {
> >  	 */
> >  };
> >  
> > -module_platform_driver_probe(atmel_pwm_driver, pwm_probe);
> > +static int __init pwm_init(void)
> > +{
> > +	return platform_driver_probe(&atmel_pwm_driver, pwm_probe);
> > +}
> > +subsys_initcall(pwm_init);
> 
> I really hate this type of patch, as it's papering over the real
> problem.  What happens when someone else moves their driver to this
> level?  Then you are back to the original problem.

Yes, it's crude, but it's currently the only way to express a preferred
probe order.

> This is what deferred probing was supposed to fix.  If it doesn't, then
> something else needs to be done, or fix the deferred probing mess...

Deferred probing (the first patch) fixes the dependency problem, but may
introduce delays. I can live with that.

> Sorry, I can't take this.

Fair enough.

Thanks,
Johan

  reply	other threads:[~2013-10-30 11:07 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-10-22 16:32 [PATCH 0/2] misc: atmel_pwm: fix probe dependencies Johan Hovold
2013-10-22 16:32 ` Johan Hovold
2013-10-22 16:32 ` [PATCH 1/2] misc: atmel_pwm: add deferred-probing support Johan Hovold
2013-10-22 16:32   ` Johan Hovold
2013-10-30 11:25   ` Johan Hovold
2013-10-30 11:25     ` Johan Hovold
2013-10-30 13:24     ` Greg Kroah-Hartman
2013-10-30 13:24       ` Greg Kroah-Hartman
2013-10-22 16:32 ` [PATCH 2/2] misc: atmel_pwm: set initcall level to subsys Johan Hovold
2013-10-22 16:32   ` Johan Hovold
2013-10-29 23:22   ` Greg Kroah-Hartman
2013-10-29 23:22     ` Greg Kroah-Hartman
2013-10-30 11:07     ` Johan Hovold [this message]
2013-10-30 11:07       ` Johan Hovold
2013-10-30 20:46       ` Arnd Bergmann
2013-10-30 20:46         ` Arnd Bergmann
2013-10-31  1:19         ` Bo Shen
2013-10-31  1:19           ` Bo Shen
2013-10-31  5:30           ` Jean-Christophe PLAGNIOL-VILLARD
2013-10-31  5:30             ` Jean-Christophe PLAGNIOL-VILLARD
2013-10-31 14:07             ` Johan Hovold
2013-10-31 14:07               ` Johan Hovold
2013-10-31 14:01         ` Johan Hovold
2013-10-31 14:01           ` Johan Hovold

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=20131030110705.GA29813@localhost \
    --to=jhovold@gmail.com \
    --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 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.