Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=0a938b9768d1fc0e12a884a6820a2e15df5a612c
Commit:     0a938b9768d1fc0e12a884a6820a2e15df5a612c
Parent:     1ad7c311079412541bebaf1c8436d405cc8c6b2c
Author:     David Brownell <[EMAIL PROTECTED]>
AuthorDate: Mon Mar 5 00:30:18 2007 -0800
Committer:  Linus Torvalds <[EMAIL PROTECTED]>
CommitDate: Mon Mar 5 07:57:51 2007 -0800

    [PATCH] add CONFIG_GENERIC_GPIO
    
    Most drivers using GPIOs already know they are running on a system that
    supports the generic GPIO calls, because of other platform dependencies.
    But the generic GPIO-based LED and input button drivers can't know that.
    
    So this patch adds a Kconfig hook, GENERIC_GPIO, to mark the platforms
    where <asm/gpio.h> will do the right thing.  Currently that's a bunch of
    ARMs, and AVR32; more are on the way.
    
    It also fixes a dependency bug for the gpio button input driver; it was
    wrong to start with, now it covers all platforms with GENERIC_GPIO.
    
    Signed-off-by: David Brownell <[EMAIL PROTECTED]>
    Acked-by: Richard Purdie <[EMAIL PROTECTED]>
    Cc: Arnaud Patard <[EMAIL PROTECTED]>
    Cc: <[EMAIL PROTECTED]>
    Cc: <[EMAIL PROTECTED]>
    Cc: pHilipp Zabel <[EMAIL PROTECTED]>
    Cc: Haavard Skinnemoen <[EMAIL PROTECTED]>
    Cc: Dmitry Torokhov <[EMAIL PROTECTED]>
    Cc: Russell King <[EMAIL PROTECTED]>
    Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
    Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>
---
 arch/arm/Kconfig               |    9 +++++++++
 arch/avr32/Kconfig             |    4 ++++
 drivers/input/keyboard/Kconfig |   10 ++++++----
 3 files changed, 19 insertions(+), 4 deletions(-)

diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index ac2ffdc..e7baca2 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -21,6 +21,10 @@ config ARM
 config SYS_SUPPORTS_APM_EMULATION
        bool
 
+config GENERIC_GPIO
+       bool
+       default n
+
 config GENERIC_TIME
        bool
        default n
@@ -163,6 +167,7 @@ config ARCH_VERSATILE
 
 config ARCH_AT91
        bool "Atmel AT91"
+       select GENERIC_GPIO
        help
          This enables support for systems based on the Atmel AT91RM9200
          and AT91SAM9xxx processors.
@@ -304,6 +309,7 @@ config ARCH_PXA
        bool "PXA2xx-based"
        depends on MMU
        select ARCH_MTD_XIP
+       select GENERIC_GPIO
        select GENERIC_TIME
        help
          Support for Intel's PXA2XX processor line.
@@ -325,11 +331,13 @@ config ARCH_SA1100
        select ISA
        select ARCH_DISCONTIGMEM_ENABLE
        select ARCH_MTD_XIP
+       select GENERIC_GPIO
        help
          Support for StrongARM 11x0 based boards.
 
 config ARCH_S3C2410
        bool "Samsung S3C2410, S3C2412, S3C2413, S3C2440, S3C2442, S3C2443"
+       select GENERIC_GPIO
        help
          Samsung S3C2410X CPU based systems, such as the Simtec Electronics
          BAST (<http://www.simtec.co.uk/products/EB110ITX/>), the IPAQ 1940 or
@@ -354,6 +362,7 @@ config ARCH_LH7A40X
 
 config ARCH_OMAP
        bool "TI OMAP"
+       select GENERIC_GPIO
        help
          Support for TI's OMAP platform (OMAP1 and OMAP2).
 
diff --git a/arch/avr32/Kconfig b/arch/avr32/Kconfig
index bb059a4..ce4013a 100644
--- a/arch/avr32/Kconfig
+++ b/arch/avr32/Kconfig
@@ -22,6 +22,10 @@ config AVR32
 config UID16
        bool
 
+config GENERIC_GPIO
+       bool
+       default y
+
 config GENERIC_HARDIRQS
        bool
        default y
diff --git a/drivers/input/keyboard/Kconfig b/drivers/input/keyboard/Kconfig
index 6450968..f17e9c7 100644
--- a/drivers/input/keyboard/Kconfig
+++ b/drivers/input/keyboard/Kconfig
@@ -215,14 +215,16 @@ config KEYBOARD_AAED2000
          module will be called aaed2000_kbd.
 
 config KEYBOARD_GPIO
-       tristate "Buttons on CPU GPIOs (PXA)"
-       depends on (ARCH_SA1100 || ARCH_PXA || ARCH_S3C2410)
+       tristate "GPIO Buttons"
+       depends on GENERIC_GPIO
        help
          This driver implements support for buttons connected
-         directly to GPIO pins of SA1100, PXA or S3C24xx CPUs.
+         to GPIO pins of various CPUs (and some other chips).
 
          Say Y here if your device has buttons connected
-         directly to GPIO pins of the CPU.
+         directly to such GPIO pins.  Your board-specific
+         setup logic must also provide a platform device,
+         with configuration data saying which GPIOs are used.
 
          To compile this driver as a module, choose M here: the
          module will be called gpio-keys.
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to