Discussion:
[ORLinux] [PATCH] gpiolib/arches: Centralise bolierplate asm/gpio.h
Linus Walleij
2012-04-16 07:21:58 UTC
Permalink
On Sun, Apr 15, 2012 at 11:52 AM, Mark Brown
Rather than requiring architectures that use gpiolib but don't have any
need to define anything custom to copy an asm/gpio.h provide a Kconfig
symbol which architectures must select in order to include gpio.h and
for other architectures just provide the trivial implementation directly.
This makes it much easier to do gpiolib updates and is also a step towards
making gpiolib APIs available on every architecture.
For architectures with existing boilerplate code leave a stub header in
place which warns on direct inclusion of asm/gpio.h and includes
linux/gpio.h to catch code that's doing this. ?Direct inclusion of
asm/gpio.h has long been deprecated.
Signed-off-by: Mark Brown <broonie at opensource.wolfsonmicro.com>
---
?arch/alpha/include/asm/gpio.h ? ? ?| ? 59 ++----------------------------
?arch/arm/Kconfig ? ? ? ? ? ? ? ? ? | ? ?1 +
?arch/avr32/Kconfig ? ? ? ? ? ? ? ? | ? ?1 +
?arch/blackfin/Kconfig ? ? ? ? ? ? ?| ? ?1 +
?arch/ia64/include/asm/gpio.h ? ? ? | ? 59 ++----------------------------
?arch/m68k/Kconfig.cpu ? ? ? ? ? ? ?| ? ?1 +
?arch/microblaze/include/asm/gpio.h | ? 57 ++---------------------------
?arch/mips/Kconfig ? ? ? ? ? ? ? ? ?| ? ?1 +
?arch/openrisc/include/asm/gpio.h ? | ? 69 ++---------------------------------
?arch/powerpc/include/asm/gpio.h ? ?| ? 57 ++---------------------------
?arch/sh/Kconfig ? ? ? ? ? ? ? ? ? ?| ? ?1 +
?arch/sparc/include/asm/gpio.h ? ? ?| ? 40 ++-------------------
?arch/unicore32/Kconfig ? ? ? ? ? ? | ? ?1 +
?arch/x86/include/asm/gpio.h ? ? ? ?| ? 57 ++---------------------------
?arch/xtensa/include/asm/gpio.h ? ? | ? 60 ++-----------------------------
?drivers/gpio/Kconfig ? ? ? ? ? ? ? | ? ?8 ++++
?include/linux/gpio.h ? ? ? ? ? ? ? | ? 34 +++++++++++++++++
?17 files changed, 81 insertions(+), 426 deletions(-)
This looks good but I think we need to page the alpha, ia64, m68k, microblaze,
openrisc etc subarch maintainers on this patch so they have their say.

Yours,
Linus Walleij
Jonas Bonn
2012-04-16 07:53:42 UTC
Permalink
Acked-by: Jonas Bonn <jonas at southpole.se> (for OpenRISC)
Post by Linus Walleij
On Sun, Apr 15, 2012 at 11:52 AM, Mark Brown
Rather than requiring architectures that use gpiolib but don't have any
need to define anything custom to copy an asm/gpio.h provide a Kconfig
symbol which architectures must select in order to include gpio.h and
for other architectures just provide the trivial implementation directly.
This makes it much easier to do gpiolib updates and is also a step towards
making gpiolib APIs available on every architecture.
For architectures with existing boilerplate code leave a stub header in
place which warns on direct inclusion of asm/gpio.h and includes
linux/gpio.h to catch code that's doing this. Direct inclusion of
asm/gpio.h has long been deprecated.
Signed-off-by: Mark Brown <broonie at opensource.wolfsonmicro.com>
---
arch/alpha/include/asm/gpio.h | 59 ++----------------------------
arch/arm/Kconfig | 1 +
arch/avr32/Kconfig | 1 +
arch/blackfin/Kconfig | 1 +
arch/ia64/include/asm/gpio.h | 59 ++----------------------------
arch/m68k/Kconfig.cpu | 1 +
arch/microblaze/include/asm/gpio.h | 57 ++---------------------------
arch/mips/Kconfig | 1 +
arch/openrisc/include/asm/gpio.h | 69 ++---------------------------------
arch/powerpc/include/asm/gpio.h | 57 ++---------------------------
arch/sh/Kconfig | 1 +
arch/sparc/include/asm/gpio.h | 40 ++-------------------
arch/unicore32/Kconfig | 1 +
arch/x86/include/asm/gpio.h | 57 ++---------------------------
arch/xtensa/include/asm/gpio.h | 60 ++-----------------------------
drivers/gpio/Kconfig | 8 ++++
include/linux/gpio.h | 34 +++++++++++++++++
17 files changed, 81 insertions(+), 426 deletions(-)
This looks good but I think we need to page the alpha, ia64, m68k, microblaze,
openrisc etc subarch maintainers on this patch so they have their say.
Yours,
Linus Walleij
_______________________________________________
Linux mailing list
Linux at lists.openrisc.net
http://lists.openrisc.net/listinfo/linux
Mark Brown
2012-04-16 08:15:32 UTC
Permalink
Post by Linus Walleij
This looks good but I think we need to page the alpha, ia64, m68k, microblaze,
openrisc etc subarch maintainers on this patch so they have their say.
That's why I CCed linux-arch, to get all the architecture maintainers
included. vger would get upset if I CCed everyone individually.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.openrisc.net/pipermail/linux/attachments/20120416/fef253a0/attachment.pgp>
Linus Walleij
2012-04-16 08:26:02 UTC
Permalink
On Mon, Apr 16, 2012 at 10:15 AM, Mark Brown
Post by Mark Brown
Post by Linus Walleij
This looks good but I think we need to page the alpha, ia64, m68k, microblaze,
openrisc etc subarch maintainers on this patch so they have their say.
That's why I CCed linux-arch, to get all the architecture maintainers
included. ?vger would get upset if I CCed everyone individually.
Oh I missed it. I looped in a few maintainers and arch lists anyway.
Acked-by: Linus Walleij <linus.walleij at linaro.org>

Thanks!
Linus Walleij
Grant Likely
2012-05-12 00:08:53 UTC
Permalink
Post by Mark Brown
Post by Linus Walleij
This looks good but I think we need to page the alpha, ia64, m68k, microblaze,
openrisc etc subarch maintainers on this patch so they have their say.
That's why I CCed linux-arch, to get all the architecture maintainers
included. vger would get upset if I CCed everyone individually.
Meh; it's been long enough. I'll build the major ones and then throw it into linux-next.

g.
--
Grant Likely, B.Sc, P.Eng.
Secret Lab Technologies, Ltd.
Loading...