All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tony Lindgren <tony@atomide.com>
To: Ezequiel Garcia <ezequiel@vanguardiasur.com.ar>
Cc: "Christoph Fritz" <chf.fritz@googlemail.com>,
	"Grygorii Strashko" <grygorii.strashko@ti.com>,
	"Pekon Gupta" <pekon@ti.com>,
	"Benoît Cousson" <bcousson@baylibre.com>,
	"Daniel Mack" <zonque@gmail.com>,
	linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH 1/5] [RFC-HACK] pinctrl-single: init by postcore_initcall()
Date: Wed, 16 Jul 2014 05:36:42 -0700	[thread overview]
Message-ID: <20140716123641.GB18374@atomide.com> (raw)
In-Reply-To: <20140716114558.GA1842@arch.cereza>

* Ezequiel Garcia <ezequiel@vanguardiasur.com.ar> [140716 04:48]:
> On 22 May 04:31 PM, Tony Lindgren wrote:
> > * Christoph Fritz <chf.fritz@googlemail.com> [140522 16:07]:
> > > --- a/drivers/pinctrl/pinctrl-single.c
> > > +++ b/drivers/pinctrl/pinctrl-single.c
> > > @@ -2069,7 +2069,22 @@ static struct platform_driver pcs_driver = {
> > >  #endif
> > >  };
> > >  
> > > +#ifdef CONFIG_USE_OF
> > > +static int __init pcs_driver_drv_init(void)
> > > +{
> > > +       return platform_driver_register(&pcs_driver);
> > > +}
> > > +postcore_initcall(pcs_driver_drv_init);
> > > +
> > > +static void __exit pcs_driver_drv_exit(void)
> > > +{
> > > +       platform_driver_unregister(&pcs_driver);
> > > +}
> > > +module_exit(pcs_driver_drv_exit);
> > > +#else
> > >  module_platform_driver(pcs_driver);
> > > +#endif
> > > +
> > 
> > I would prefer to initialize all the drivers with module_init
> > and and if necessary, selected frameworks with subsys_initcall. 
> > 
> > In drivers/Makefile we do have painctrl before gpio, so this
> > too could be just module_init once the other drivers are fixed.
> > 
> 
> I've been using patches that change gpio and i2c initialization to module_init
> for some time now. However, I still see some non-DT boards using the GPIO API
> in early functions such as .init_machine.
> 
> Only when these boards get converted and the legacy support is dropped, we'll
> be able to move all the drivers to module_init.

Hmm yeah tons of dependencies to dropping the legacy booting.. But to not
have that dependency maybe we can convert those .init_machine functions
easily to late_initcall.

Regards,

Tony

WARNING: multiple messages have this Message-ID (diff)
From: tony@atomide.com (Tony Lindgren)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 1/5] [RFC-HACK] pinctrl-single: init by postcore_initcall()
Date: Wed, 16 Jul 2014 05:36:42 -0700	[thread overview]
Message-ID: <20140716123641.GB18374@atomide.com> (raw)
In-Reply-To: <20140716114558.GA1842@arch.cereza>

* Ezequiel Garcia <ezequiel@vanguardiasur.com.ar> [140716 04:48]:
> On 22 May 04:31 PM, Tony Lindgren wrote:
> > * Christoph Fritz <chf.fritz@googlemail.com> [140522 16:07]:
> > > --- a/drivers/pinctrl/pinctrl-single.c
> > > +++ b/drivers/pinctrl/pinctrl-single.c
> > > @@ -2069,7 +2069,22 @@ static struct platform_driver pcs_driver = {
> > >  #endif
> > >  };
> > >  
> > > +#ifdef CONFIG_USE_OF
> > > +static int __init pcs_driver_drv_init(void)
> > > +{
> > > +       return platform_driver_register(&pcs_driver);
> > > +}
> > > +postcore_initcall(pcs_driver_drv_init);
> > > +
> > > +static void __exit pcs_driver_drv_exit(void)
> > > +{
> > > +       platform_driver_unregister(&pcs_driver);
> > > +}
> > > +module_exit(pcs_driver_drv_exit);
> > > +#else
> > >  module_platform_driver(pcs_driver);
> > > +#endif
> > > +
> > 
> > I would prefer to initialize all the drivers with module_init
> > and and if necessary, selected frameworks with subsys_initcall. 
> > 
> > In drivers/Makefile we do have painctrl before gpio, so this
> > too could be just module_init once the other drivers are fixed.
> > 
> 
> I've been using patches that change gpio and i2c initialization to module_init
> for some time now. However, I still see some non-DT boards using the GPIO API
> in early functions such as .init_machine.
> 
> Only when these boards get converted and the legacy support is dropped, we'll
> be able to move all the drivers to module_init.

Hmm yeah tons of dependencies to dropping the legacy booting.. But to not
have that dependency maybe we can convert those .init_machine functions
easily to late_initcall.

Regards,

Tony

  reply	other threads:[~2014-07-16 12:38 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-22 23:06 [PATCH 0/5] ARM: omap3-lilly-a83x: update board support Christoph Fritz
2014-05-22 23:06 ` Christoph Fritz
2014-05-22 23:06 ` [PATCH 1/5] [RFC-HACK] pinctrl-single: init by postcore_initcall() Christoph Fritz
2014-05-22 23:06   ` Christoph Fritz
2014-05-22 23:31   ` Tony Lindgren
2014-05-22 23:31     ` Tony Lindgren
2014-07-16 11:45     ` Ezequiel Garcia
2014-07-16 11:45       ` Ezequiel Garcia
2014-07-16 12:36       ` Tony Lindgren [this message]
2014-07-16 12:36         ` Tony Lindgren
2014-07-16 13:30         ` Ezequiel Garcia
2014-07-16 13:30           ` Ezequiel Garcia
2014-05-22 23:06 ` [PATCH 2/5] [RFC-HACK] ARM: dts: OMAP3: reorder pinmux_gpio1_pins Christoph Fritz
2014-05-22 23:06   ` Christoph Fritz
2014-05-22 23:32   ` Tony Lindgren
2014-05-22 23:32     ` Tony Lindgren
2014-05-22 23:06 ` [PATCH 3/5] ARM: dts: omap3: set mcbsp2 status Christoph Fritz
2014-05-22 23:06   ` Christoph Fritz
2014-05-27 20:40   ` Tony Lindgren
2014-05-27 20:40     ` Tony Lindgren
2014-05-22 23:06 ` [PATCH 4/5] [RFC] ARM: OMAP2+: gpmc: fix gpmc_hwecc_bch_capable Christoph Fritz
2014-05-22 23:06   ` Christoph Fritz
2014-05-27  7:16   ` Gupta, Pekon
2014-05-27  7:16     ` Gupta, Pekon
2014-07-08  6:25     ` Gupta, Pekon
2014-07-08  6:25       ` Gupta, Pekon
2014-07-10 10:44       ` Christoph Fritz
2014-07-10 10:44         ` Christoph Fritz
2014-05-22 23:06 ` [PATCH 5/5] ARM: dts: OMAP3 a83x: fix duplicate usb pin config Christoph Fritz
2014-05-22 23:06   ` Christoph Fritz
2014-05-27 20:40   ` Tony Lindgren
2014-05-27 20:40     ` Tony Lindgren
2014-05-22 23:28 ` [PATCH 0/5] ARM: omap3-lilly-a83x: update board support Tony Lindgren
2014-05-22 23:28   ` Tony Lindgren
2014-05-23  0:24   ` Christoph Fritz
2014-05-23  0:24     ` Christoph Fritz

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=20140716123641.GB18374@atomide.com \
    --to=tony@atomide.com \
    --cc=bcousson@baylibre.com \
    --cc=chf.fritz@googlemail.com \
    --cc=ezequiel@vanguardiasur.com.ar \
    --cc=grygorii.strashko@ti.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=pekon@ti.com \
    --cc=zonque@gmail.com \
    /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.