[PATCH 1/7] [OMAP] gpio: Allow for extended GPIO space

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This change copies from the s3c24xx the ability for a board to specify
if it wants 64 or 128 more GPIOs in the board space.  This is needed
to get the HTC Herald board's extra htcpld gpios to work as actual
gpios.

Signed-off-by: Cory Maccarrone <darkstar6262@xxxxxxxxx>
---
 arch/arm/plat-omap/Kconfig             |   18 ++++++++++++++++++
 arch/arm/plat-omap/include/plat/gpio.h |    7 +++++++
 2 files changed, 25 insertions(+), 0 deletions(-)

diff --git a/arch/arm/plat-omap/Kconfig b/arch/arm/plat-omap/Kconfig
index e2ed952..5bc7a79 100644
--- a/arch/arm/plat-omap/Kconfig
+++ b/arch/arm/plat-omap/Kconfig
@@ -2,6 +2,24 @@ if ARCH_OMAP
 
 menu "TI OMAP Common Features"
 
+config OMAP_GPIO_EXTRA
+	int
+	default 128 if OMAP_GPIO_EXTRA128
+	default 64 if OMAP_GPIO_EXTRA64
+	default 0
+
+config OMAP_GPIO_EXTRA64
+	bool
+	help
+	  Add an extra 64 gpio numbers to the available GPIO pool. This is
+	  available for boards that need extra gpios for external devices.
+
+config OMAP_GPIO_EXTRA128
+	bool
+	help
+	  Add an extra 128 gpio numbers to the available GPIO pool. This is
+	  available for boards that need extra gpios for external devices.
+
 config ARCH_OMAP_OTG
 	bool
 
diff --git a/arch/arm/plat-omap/include/plat/gpio.h b/arch/arm/plat-omap/include/plat/gpio.h
index de1c604..d21b790 100644
--- a/arch/arm/plat-omap/include/plat/gpio.h
+++ b/arch/arm/plat-omap/include/plat/gpio.h
@@ -86,6 +86,13 @@ extern void omap_gpio_restore_context(void);
  * The original OMAP-specfic calls should eventually be removed.
  */
 
+/*
+ * Some boards require extra gpio capacity to support external
+ * devices that need GPIO.
+ */
+
+#define ARCH_NR_GPIOS	(256 + CONFIG_OMAP_GPIO_EXTRA)
+
 #include <linux/errno.h>
 #include <asm-generic/gpio.h>
 
-- 
1.7.0.4

--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Arm (vger)]     [ARM Kernel]     [ARM MSM]     [Linux Tegra]     [Linux WPAN Networking]     [Linux Wireless Networking]     [Maemo Users]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux