* moving gpio driver to drivers/gpio, how to initialize?
@ 2011-05-11 14:11 Sascha Hauer
2011-05-11 14:20 ` Jamie Iles
0 siblings, 1 reply; 4+ messages in thread
From: Sascha Hauer @ 2011-05-11 14:11 UTC (permalink / raw)
To: linux-arm-kernel
I think we mostly agree on moving the gpio drivers from arch/arm to
drivers/gpio. A question we have to answer is how we want to initialize
these drivers. On nomadik these are platform drivers, but on i.MX and
others platform drivers initialize too late, since the gpio functions
are already used at init_machine time. PXA uses sysdev for their gpios,
but is this the correct answer?
I have the impression that a platform device is the right answer to
this, but it would require changes in many boards.
Any thoughts?
--
Pengutronix e.K. | |
Industrial Linux Solutions | http://www.pengutronix.de/ |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
^ permalink raw reply [flat|nested] 4+ messages in thread
* moving gpio driver to drivers/gpio, how to initialize?
2011-05-11 14:11 moving gpio driver to drivers/gpio, how to initialize? Sascha Hauer
@ 2011-05-11 14:20 ` Jamie Iles
2011-05-11 14:42 ` Sascha Hauer
2011-05-11 16:07 ` Rob Herring
0 siblings, 2 replies; 4+ messages in thread
From: Jamie Iles @ 2011-05-11 14:20 UTC (permalink / raw)
To: linux-arm-kernel
On Wed, May 11, 2011 at 04:11:53PM +0200, Sascha Hauer wrote:
> I think we mostly agree on moving the gpio drivers from arch/arm to
> drivers/gpio. A question we have to answer is how we want to initialize
> these drivers. On nomadik these are platform drivers, but on i.MX and
> others platform drivers initialize too late, since the gpio functions
> are already used at init_machine time. PXA uses sysdev for their gpios,
> but is this the correct answer?
The omap gpio driver registers the platform_driver as a
postcore_initcall so that it can use GPIO in the machine init for this
reason. A platform_device/driver feels like the right way to do this
IMHO.
Jamie
^ permalink raw reply [flat|nested] 4+ messages in thread
* moving gpio driver to drivers/gpio, how to initialize?
2011-05-11 14:20 ` Jamie Iles
@ 2011-05-11 14:42 ` Sascha Hauer
2011-05-11 16:07 ` Rob Herring
1 sibling, 0 replies; 4+ messages in thread
From: Sascha Hauer @ 2011-05-11 14:42 UTC (permalink / raw)
To: linux-arm-kernel
On Wed, May 11, 2011 at 03:20:16PM +0100, Jamie Iles wrote:
> On Wed, May 11, 2011 at 04:11:53PM +0200, Sascha Hauer wrote:
> > I think we mostly agree on moving the gpio drivers from arch/arm to
> > drivers/gpio. A question we have to answer is how we want to initialize
> > these drivers. On nomadik these are platform drivers, but on i.MX and
> > others platform drivers initialize too late, since the gpio functions
> > are already used at init_machine time. PXA uses sysdev for their gpios,
> > but is this the correct answer?
>
> The omap gpio driver registers the platform_driver as a
> postcore_initcall so that it can use GPIO in the machine init for this
> reason. A platform_device/driver feels like the right way to do this
> IMHO.
Ah, I somehow missed that platform drivers can be up and running at
init_machine time. Then this is not a problem at all.
Sascha
--
Pengutronix e.K. | |
Industrial Linux Solutions | http://www.pengutronix.de/ |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
^ permalink raw reply [flat|nested] 4+ messages in thread
* moving gpio driver to drivers/gpio, how to initialize?
2011-05-11 14:20 ` Jamie Iles
2011-05-11 14:42 ` Sascha Hauer
@ 2011-05-11 16:07 ` Rob Herring
1 sibling, 0 replies; 4+ messages in thread
From: Rob Herring @ 2011-05-11 16:07 UTC (permalink / raw)
To: linux-arm-kernel
On 05/11/2011 09:20 AM, Jamie Iles wrote:
> On Wed, May 11, 2011 at 04:11:53PM +0200, Sascha Hauer wrote:
>> I think we mostly agree on moving the gpio drivers from arch/arm to
>> drivers/gpio. A question we have to answer is how we want to initialize
>> these drivers. On nomadik these are platform drivers, but on i.MX and
>> others platform drivers initialize too late, since the gpio functions
>> are already used at init_machine time. PXA uses sysdev for their gpios,
>> but is this the correct answer?
>
> The omap gpio driver registers the platform_driver as a
> postcore_initcall so that it can use GPIO in the machine init for this
> reason. A platform_device/driver feels like the right way to do this
> IMHO.
>
An early_platform_device may be a better approach to avoid init level
tweaking. This would be needed for timers if the SH timer approach is
adopted.
Rob
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2011-05-11 16:07 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-05-11 14:11 moving gpio driver to drivers/gpio, how to initialize? Sascha Hauer
2011-05-11 14:20 ` Jamie Iles
2011-05-11 14:42 ` Sascha Hauer
2011-05-11 16:07 ` Rob Herring
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).