From: David Brownell <david-b@pacbell.net>
To: Andrew Morton <akpm@linux-foundation.org>,
Linux Kernel list <linux-kernel@vger.kernel.org>
Cc: Jean Delvare <khali@linux-fr.org>, eric miao <eric.y.miao@gmail.com>
Subject: [patch 2.6.24-rc6-mm 1/9] gpiolib: add drivers/gpio directory
Date: Fri, 28 Dec 2007 19:53:19 -0800 [thread overview]
Message-ID: <200712281953.20103.david-b@pacbell.net> (raw)
In-Reply-To: <200712281927.32575.david-b@pacbell.net>
From: David Brownell <dbrownell@users.sourceforge.net>
Add an empty drivers/gpio directory for gpiolib infrastructure
and GPIO expanders. It is populated by subsequent patches.
This won't be the only place to hold such gpio_chip code. Many
external chips add a few GPIOs as secondary functionality (such
as MFD drivers) and platform code frequently needs to closely
integrate GPIO and IRQ support.
This is placed *early* in the build/link sequence since it's common
for other drivers to depend on GPIOs to do their work, so they must
be initialized early in the device_initcall() sequence.
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Acked-by: Jean Delvare <khali@linux-fr.org>
Cc: Eric Miao <eric.miao@marvell.com>
---
arch/arm/Kconfig | 2 ++
drivers/Kconfig | 2 ++
drivers/Makefile | 1 +
drivers/gpio/Kconfig | 32 ++++++++++++++++++++++++++++++++
drivers/gpio/Makefile | 6 ++++++
5 files changed, 43 insertions(+)
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -1040,6 +1040,8 @@ source "drivers/i2c/Kconfig"
source "drivers/spi/Kconfig"
+source "drivers/gpio/Kconfig"
+
source "drivers/w1/Kconfig"
source "drivers/power/Kconfig"
--- a/drivers/Kconfig
+++ b/drivers/Kconfig
@@ -52,6 +52,8 @@ source "drivers/i2c/Kconfig"
source "drivers/spi/Kconfig"
+source "drivers/gpio/Kconfig"
+
source "drivers/w1/Kconfig"
source "drivers/power/Kconfig"
--- a/drivers/Makefile
+++ b/drivers/Makefile
@@ -5,6 +5,7 @@
# Rewritten to use lists instead of if-statements.
#
+obj-$(CONFIG_GPIO_LIB) += gpio/
obj-$(CONFIG_PCI) += pci/
obj-$(CONFIG_PARISC) += parisc/
obj-$(CONFIG_RAPIDIO) += rapidio/
--- /dev/null
+++ b/drivers/gpio/Kconfig
@@ -0,0 +1,32 @@
+#
+# GPIO infrastructure and expanders
+#
+
+config GPIO_LIB
+ bool
+ help
+ Platforms select gpiolib if they use this infrastructure
+ for all their GPIOs, usually starting with ones integrated
+ into SOC processors.
+
+menu "GPIO Support"
+ depends on GPIO_LIB
+
+config DEBUG_GPIO
+ bool "Debug GPIO calls"
+ depends on DEBUG_KERNEL
+ help
+ Say Y here to add some extra checks and diagnostics to GPIO calls.
+ The checks help ensure that GPIOs have been properly initialized
+ before they are used and that sleeping calls aren not made from
+ nonsleeping contexts. They can make bitbanged serial protocols
+ slower. The diagnostics help catch the type of setup errors
+ that are most common when setting up new platforms or boards.
+
+# put expanders in the right section, in alphabetical order
+
+comment "I2C GPIO expanders:"
+
+comment "SPI GPIO expanders:"
+
+endmenu
--- /dev/null
+++ b/drivers/gpio/Makefile
@@ -0,0 +1,6 @@
+# gpio support: dedicated expander chips, etc
+
+ifeq ($(CONFIG_DEBUG_GPIO),y)
+EXTRA_CFLAGS += -DDEBUG
+endif
+
next parent reply other threads:[~2007-12-29 4:05 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <200712281927.32575.david-b@pacbell.net>
2007-12-29 3:53 ` David Brownell [this message]
2007-12-29 6:58 ` [patch 2.6.24-rc6-mm 1/9] gpiolib: add drivers/gpio directory Sam Ravnborg
2007-12-29 18:19 ` David Brownell
2007-12-29 19:03 ` Sam Ravnborg
2008-01-05 20:07 ` David Brownell
2007-12-29 3:54 ` [patch 2.6.24-rc6-mm 2/9] gpiolib: add gpio provider infrastructure David Brownell
2007-12-29 7:10 ` Sam Ravnborg
2007-12-29 18:35 ` David Brownell
2008-01-05 20:08 ` David Brownell
2007-12-29 3:55 ` [patch 2.6.24-rc6-mm 3/9] gpiolib: update Documentation/gpio.txt David Brownell
2008-01-05 20:09 ` David Brownell
2007-12-29 3:56 ` [patch 2.6.24-rc6-mm 4/9] gpiolib: avr32 at32ap platform support David Brownell
2008-01-05 20:10 ` David Brownell
2008-01-05 20:49 ` Haavard Skinnemoen
2008-01-05 22:09 ` David Brownell
2007-12-29 3:57 ` [patch 2.6.24-rc6-mm 5/9] gpiolib: pxa " David Brownell
2008-01-05 20:11 ` David Brownell
2007-12-29 3:58 ` [patch 2.6.24-rc6-mm 6/9] gpiolib: pcf857x i2c gpio expander support David Brownell
2008-01-05 20:13 ` David Brownell
2007-12-29 3:58 ` [patch 2.6.24-rc6-mm 7/9] gpiolib: mcp23s08 spi " David Brownell
2007-12-29 3:58 ` [patch 2.6.24-rc6-mm 8/9] gpiolib: pca9539 i2c " David Brownell
2008-01-02 13:46 ` Jean Delvare
2008-01-04 1:41 ` David Brownell
2008-01-05 19:40 ` David Brownell
2008-01-06 12:59 ` Jean Delvare
2007-12-29 3:59 ` [patch 2.6.24-rc6-mm 9/9] gpiolib: deprecate obsolete pca9539 driver David Brownell
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200712281953.20103.david-b@pacbell.net \
--to=david-b@pacbell.net \
--cc=akpm@linux-foundation.org \
--cc=eric.y.miao@gmail.com \
--cc=khali@linux-fr.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox