public inbox for linux-m68k@lists.linux-m68k.org
 help / color / mirror / Atom feed
* Re: [PATCH 0/4] gpio: introduce descriptor-based interface
       [not found]     ` <201301101008.45091.arnd@arndb.de>
@ 2013-01-14 10:21       ` Alex Courbot
       [not found]       ` <50F3DC2B.6000603@nvidia.com>
  1 sibling, 0 replies; 2+ messages in thread
From: Alex Courbot @ 2013-01-14 10:21 UTC (permalink / raw)
  To: Arnd Bergmann, Mike Frysinger, Geert Uytterhoeven
  Cc: Grant Likely, Linus Walleij, Guenter Roeck,
	Linux Kernel Mailing List, linux-arch,
	linux-arm-kernel@lists.infradead.org,
	devicetree-discuss@lists.ozlabs.org, gnurou, linux-m68k,
	uclinux-dist-devel

On 01/10/2013 07:08 PM, Arnd Bergmann wrote:
> I've tried to find platforms that don't yet use GPIOLIB and fortunately
> there are very few left:
>
> I found two that provide the generic gpio interfaces when gpiolib
> is disabled, but use gpiolib otherwise for the same hardware,
> arch/m68k/include/asm/mcfgpio.h and arch/blackfin/include/asm/gpio.h.
> I would assume that we can simply remove the non-gpiolib shortcut
> here at cost of a small overhead.

I performed a search on my side too (checking configurations options 
which select GENERIC_GPIO but not ARCH_REQUIRE_GPIOLIB) and found the 
same list. This takes some time btw - many platforms use this combo to 
make GPIO support optional. Can I ask how you figured out these two archs?

I'd assume the overhead induced by forcibly compiling GPIOlib is 
neglectable, but let's make sure this is ok indeed - Mike, Geert, would 
you mind if selecting GENERIC_GPIO enforced GPIOlib to be compiled in, 
effectively making it mandatory to implement the generic GPIO interface 
using GPIOlib? Both your implementations support GPIOlib already, but 
can also work without it, and that would make that possibility obsolete.

> Then there are a bunch that use gpiolib but have a nontrivial
> implementation of gpio_get_value and other functions. I'm not sure
> if these are a problematic with your code.

AFAICT these all implement an inline path that bypasses GPIOlib when the 
GPIO number is known at compile time, for faster bitbanging I presume. 
It should be totally harmless to keep them. Unfortunately, I don't think 
it would be possible to have a similar trick using handlers.

Thanks,
Alex.

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH 0/4] gpio: introduce descriptor-based interface
       [not found]       ` <50F3DC2B.6000603@nvidia.com>
@ 2013-01-14 10:46         ` Arnd Bergmann
  0 siblings, 0 replies; 2+ messages in thread
From: Arnd Bergmann @ 2013-01-14 10:46 UTC (permalink / raw)
  To: Alex Courbot
  Cc: Mike Frysinger, Geert Uytterhoeven, Grant Likely, Linus Walleij,
	Guenter Roeck, Linux Kernel Mailing List, linux-arch,
	linux-arm-kernel@lists.infradead.org,
	devicetree-discuss@lists.ozlabs.org, gnurou, linux-m68k,
	uclinux-dist-devel

On Monday 14 January 2013, Alex Courbot wrote:
> On 01/10/2013 07:08 PM, Arnd Bergmann wrote:
> > I found two that provide the generic gpio interfaces when gpiolib
> > is disabled, but use gpiolib otherwise for the same hardware,
> > arch/m68k/include/asm/mcfgpio.h and arch/blackfin/include/asm/gpio.h.
> > I would assume that we can simply remove the non-gpiolib shortcut
> > here at cost of a small overhead.
> 
> I performed a search on my side too (checking configurations options 
> which select GENERIC_GPIO but not ARCH_REQUIRE_GPIOLIB) and found the 
> same list. This takes some time btw - many platforms use this combo to 
> make GPIO support optional. Can I ask how you figured out these two archs?

I basically grepped for GENERIC_GPIO and looked at
the individual implementations.

> > Then there are a bunch that use gpiolib but have a nontrivial
> > implementation of gpio_get_value and other functions. I'm not sure
> > if these are a problematic with your code.
> 
> AFAICT these all implement an inline path that bypasses GPIOlib when the 
> GPIO number is known at compile time, for faster bitbanging I presume. 
> It should be totally harmless to keep them. Unfortunately, I don't think 
> it would be possible to have a similar trick using handlers.

Right, makes sense.

	Arnd

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-01-14 10:46 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <1357629535-26033-1-git-send-email-acourbot@nvidia.com>
     [not found] ` <201301091046.13020.arnd@arndb.de>
     [not found]   ` <2270940.DTxEYMZtED@percival>
     [not found]     ` <201301101008.45091.arnd@arndb.de>
2013-01-14 10:21       ` [PATCH 0/4] gpio: introduce descriptor-based interface Alex Courbot
     [not found]       ` <50F3DC2B.6000603@nvidia.com>
2013-01-14 10:46         ` Arnd Bergmann

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox