* GPIO vs. other drivers order
@ 2011-06-15 11:57 Dmitry Eremin-Solenikov
2011-06-15 12:06 ` Jamie Iles
0 siblings, 1 reply; 4+ messages in thread
From: Dmitry Eremin-Solenikov @ 2011-06-15 11:57 UTC (permalink / raw)
To: linux-arm-kernel
Hello, colleagues,
I'm currently looking at cleaning up LoCoMo and Scoop2 drivers (custom
Sharp ASICs used by Sharp Zaurus PDAs). One of the problems I'm stuck at
is about GPIO parts of that chips: there are plenty of other devices
depending on GPIO pins working correctly (ranging from board code
itself up to several other sub-drivers).
What would be the better approach: to create a basic-mmio-gpio node (and
hope for the order of initialization to be correct) or embed bgpio into
main driver and call all necessary hooks directly from it?
--
With best wishes
Dmitry
^ permalink raw reply [flat|nested] 4+ messages in thread
* GPIO vs. other drivers order
2011-06-15 11:57 GPIO vs. other drivers order Dmitry Eremin-Solenikov
@ 2011-06-15 12:06 ` Jamie Iles
2011-06-15 12:18 ` Dmitry Eremin-Solenikov
0 siblings, 1 reply; 4+ messages in thread
From: Jamie Iles @ 2011-06-15 12:06 UTC (permalink / raw)
To: linux-arm-kernel
Hi Dmitry,
On Wed, Jun 15, 2011 at 11:57:58AM +0000, Dmitry Eremin-Solenikov wrote:
> Hello, colleagues,
>
> I'm currently looking at cleaning up LoCoMo and Scoop2 drivers (custom
> Sharp ASICs used by Sharp Zaurus PDAs). One of the problems I'm stuck at
> is about GPIO parts of that chips: there are plenty of other devices
> depending on GPIO pins working correctly (ranging from board code
> itself up to several other sub-drivers).
>
> What would be the better approach: to create a basic-mmio-gpio node (and
> hope for the order of initialization to be correct) or embed bgpio into
> main driver and call all necessary hooks directly from it?
Currently the basic-mmio-gpio platform driver is registed with a
module_initcall so this may be too late for any machines that need GPIO
in their .init_machine callback. Moving the registration to a
postcore_initcall (as OMAP does) and I don't recall seeing any
objections to this.
If the basic-mmio-gpio driver does everything you need then registering
it as a platform_device would be fine imho. If you need to add/override
some of the generic functionallity then embedding the bgpio_chip into
your own structure is the probably best way to go.
Jamie
^ permalink raw reply [flat|nested] 4+ messages in thread
* GPIO vs. other drivers order
2011-06-15 12:06 ` Jamie Iles
@ 2011-06-15 12:18 ` Dmitry Eremin-Solenikov
2011-06-15 12:31 ` Jamie Iles
0 siblings, 1 reply; 4+ messages in thread
From: Dmitry Eremin-Solenikov @ 2011-06-15 12:18 UTC (permalink / raw)
To: linux-arm-kernel
On 6/15/11, Jamie Iles <jamie@jamieiles.com> wrote:
> Hi Dmitry,
>
> On Wed, Jun 15, 2011 at 11:57:58AM +0000, Dmitry Eremin-Solenikov wrote:
>> Hello, colleagues,
>>
>> I'm currently looking at cleaning up LoCoMo and Scoop2 drivers (custom
>> Sharp ASICs used by Sharp Zaurus PDAs). One of the problems I'm stuck at
>> is about GPIO parts of that chips: there are plenty of other devices
>> depending on GPIO pins working correctly (ranging from board code
>> itself up to several other sub-drivers).
>>
>> What would be the better approach: to create a basic-mmio-gpio node (and
>> hope for the order of initialization to be correct) or embed bgpio into
>> main driver and call all necessary hooks directly from it?
>
> Currently the basic-mmio-gpio platform driver is registed with a
> module_initcall so this may be too late for any machines that need GPIO
> in their .init_machine callback. Moving the registration to a
> postcore_initcall (as OMAP does) and I don't recall seeing any
> objections to this.
Will someone commit this or I'll have to submit this as a patch?
Platform (collie) uses GPIOs for managing RTS/CTS/DTR/DSR,
but I think I'll be able to workaround this somehow.
> If the basic-mmio-gpio driver does everything you need then registering
> it as a platform_device would be fine imho. If you need to add/override
> some of the generic functionallity then embedding the bgpio_chip into
> your own structure is the probably best way to go.
I'll need to extend it with enable/disable bits, but I think this
change is generic
enough to be submitted to main driver.
--
With best wishes
Dmitry
^ permalink raw reply [flat|nested] 4+ messages in thread
* GPIO vs. other drivers order
2011-06-15 12:18 ` Dmitry Eremin-Solenikov
@ 2011-06-15 12:31 ` Jamie Iles
0 siblings, 0 replies; 4+ messages in thread
From: Jamie Iles @ 2011-06-15 12:31 UTC (permalink / raw)
To: linux-arm-kernel
On Wed, Jun 15, 2011 at 04:18:42PM +0400, Dmitry Eremin-Solenikov wrote:
> On 6/15/11, Jamie Iles <jamie@jamieiles.com> wrote:
> > Hi Dmitry,
> >
> > On Wed, Jun 15, 2011 at 11:57:58AM +0000, Dmitry Eremin-Solenikov wrote:
> >> Hello, colleagues,
> >>
> >> I'm currently looking at cleaning up LoCoMo and Scoop2 drivers (custom
> >> Sharp ASICs used by Sharp Zaurus PDAs). One of the problems I'm stuck at
> >> is about GPIO parts of that chips: there are plenty of other devices
> >> depending on GPIO pins working correctly (ranging from board code
> >> itself up to several other sub-drivers).
> >>
> >> What would be the better approach: to create a basic-mmio-gpio node (and
> >> hope for the order of initialization to be correct) or embed bgpio into
> >> main driver and call all necessary hooks directly from it?
> >
> > Currently the basic-mmio-gpio platform driver is registed with a
> > module_initcall so this may be too late for any machines that need GPIO
> > in their .init_machine callback. Moving the registration to a
> > postcore_initcall (as OMAP does) and I don't recall seeing any
> > objections to this.
>
> Will someone commit this or I'll have to submit this as a patch?
There aren't any patches for this circulating at the moment so feel free
to submit one. If not, then I'm happy to do so.
Jamie
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2011-06-15 12:31 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-06-15 11:57 GPIO vs. other drivers order Dmitry Eremin-Solenikov
2011-06-15 12:06 ` Jamie Iles
2011-06-15 12:18 ` Dmitry Eremin-Solenikov
2011-06-15 12:31 ` Jamie Iles
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).