[i2c] [PATCH] basic gpio_chip support for 16-bit PCA9539 GPIO expander

David Brownell david-b at pacbell.net
Thu Dec 6 03:51:04 CET 2007


On Tuesday 04 December 2007, Jean Delvare wrote:
> Also as discussed earlier, did we reach a consensus on the right
> location for these GPIO driver in the tree? My preference still goes to
> drivers/gpio.

You mean, like starting with this patch and growing the directory?


=========	SNIP!
Add an empty drivers/gpio directory for gpiolib based GPIO expanders.
We already have three of them, and there are dozens more such chips
that only exist for GPIO expansion.  (Most external chips add GPIOs
as secondary functionality; examples include power management chips
and codecs that also have a handful of GPIOs.)

Signed-off-by: David Brownell <dbrownell at users.sourceforge.net>

---
 arch/arm/Kconfig      |    2 ++
 drivers/Kconfig       |    2 ++
 drivers/Makefile      |    1 +
 drivers/gpio/Kconfig  |    8 ++++++++
 drivers/gpio/Makefile |    1 +
 5 files changed, 14 insertions(+)

--- g26.orig/arch/arm/Kconfig	2007-12-05 17:24:19.000000000 -0800
+++ g26/arch/arm/Kconfig	2007-12-05 17:28:13.000000000 -0800
@@ -989,6 +989,8 @@ source "drivers/base/Kconfig"
 
 source "drivers/connector/Kconfig"
 
+source "drivers/gpio/Kconfig"
+
 if ALIGNMENT_TRAP || !CPU_CP15_MMU
 source "drivers/mtd/Kconfig"
 endif
--- g26.orig/drivers/Kconfig	2007-10-23 22:52:53.000000000 -0700
+++ g26/drivers/Kconfig	2007-12-05 17:28:13.000000000 -0800
@@ -6,6 +6,8 @@ source "drivers/base/Kconfig"
 
 source "drivers/connector/Kconfig"
 
+source "drivers/gpio/Kconfig"
+
 source "drivers/mtd/Kconfig"
 
 source "drivers/of/Kconfig"
--- g26.orig/drivers/Makefile	2007-10-23 22:52:53.000000000 -0700
+++ g26/drivers/Makefile	2007-12-05 17:28:13.000000000 -0800
@@ -5,6 +5,7 @@
 # Rewritten to use lists instead of if-statements.
 #
 
+obj-$(CONFIG_GPIOLIB)		+= gpio/
 obj-$(CONFIG_PCI)		+= pci/
 obj-$(CONFIG_PARISC)		+= parisc/
 obj-$(CONFIG_RAPIDIO)		+= rapidio/
--- /dev/null	1970-01-01 00:00:00.000000000 +0000
+++ g26/drivers/gpio/Kconfig	2007-12-05 17:28:13.000000000 -0800
@@ -0,0 +1,8 @@
+#
+# platform-neutral GPIO support
+#
+
+menu "GPIO Support"
+	depends on GPIO_LIB
+
+endmenu
--- /dev/null	1970-01-01 00:00:00.000000000 +0000
+++ g26/drivers/gpio/Makefile	2007-12-05 17:28:13.000000000 -0800
@@ -0,0 +1 @@
+# gpio support: dedicated expander chips, etc




More information about the i2c mailing list