gpiolib: allow user-selection

This patch adds functionality to the gpio-lib subsystem to make it
possible to enable the gpio-lib code even if the architecture code didn't
request to get it built in.

The archtitecture code does still need to implement the gpiolib accessor
functions in its asm/gpio.h file.  This patch adds the implementations for
x86 and PPC.

With these changes it is possible to run generic GPIO expansion cards on
every architecture that implements the trivial wrapper functions.  Support
for more architectures can easily be added.

Signed-off-by: Michael Buesch <[email protected]>
Cc: Benjamin Herrenschmidt <[email protected]>
Cc: Stephen Rothwell <[email protected]>
Cc: David Brownell <[email protected]>
Cc: Russell King <[email protected]>
Cc: Haavard Skinnemoen <[email protected]>
Cc: Jesper Nilsson <[email protected]>
Cc: Ralf Baechle <[email protected]>
Cc: Paul Mackerras <[email protected]>
Cc: Benjamin Herrenschmidt <[email protected]>
Cc: Ingo Molnar <[email protected]>
Cc: Thomas Gleixner <[email protected]>
Cc: Jean Delvare <[email protected]>
Cc: Samuel Ortiz <[email protected]>
Cc: Kumar Gala <[email protected]>
Cc: Sam Ravnborg <[email protected]>
Cc: Adrian Bunk <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
Michael Buesch 2008-07-25 01:46:11 -07:00 • committed by Linus Torvalds
commit 7444a72eff
18 changed files with 116 additions and 23 deletions

View file

@ -36,7 +36,7 @@ config MFD_ASIC3
config HTC_EGPIO
bool "HTC EGPIO support"
depends on GENERIC_HARDIRQS && HAVE_GPIO_LIB && ARM
depends on GENERIC_HARDIRQS && GPIOLIB && ARM
help
This driver supports the CPLD egpio chip present on
several HTC phones. It provides basic support for input
@ -52,7 +52,7 @@ config HTC_PASIC3
config MFD_TC6393XB
bool "Support Toshiba TC6393XB"
depends on HAVE_GPIO_LIB
depends on GPIOLIB
select MFD_CORE
help
Support for Toshiba Mobile IO Controller TC6393XB