aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/leds/Kconfig
diff options
context:
space:
mode:
authorJoachim Eastwood <manabian@gmail.com>2011-05-24 20:13:23 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2011-05-25 11:39:50 -0400
commit3c1ab50d0a31b27bb4e55168f4901dd91e6e5ea4 (patch)
treea9ec955ad64bda0ff64f5654c1b16eeb79e0d895 /drivers/leds/Kconfig
parentfff26f8141145e01eae8f4d6e642ac8a0d500158 (diff)
drivers/leds/leds-pca9532.c: add gpio capability
Allow unused leds on pca9532 to be used as gpio. The board I am working on now has no less than 6 pca9532 chips. One chips is used for only leds, one has 14 leds and 2 gpio and the rest of the chips are gpio only. There is also one board in mainline which could use this capabilty; arch/arm/mach-iop32x/n2100.c 232 { .type = PCA9532_TYPE_NONE }, /* power OFF gpio */ 233 { .type = PCA9532_TYPE_NONE }, /* reset gpio */ This patch defines a new pin type, PCA9532_TYPE_GPIO, and registers a gpiochip if any pin has this type set. The gpio will registers all chip pins but will filter on gpio_request. [randy.dunlap@oracle.com: fix build when GPIOLIB is not enabled] Signed-off-by: Joachim Eastwood <joachim.eastwood@jotron.com> Reviewed-by: Wolfram Sang <w.sang@pengutronix.de> Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Richard Purdie <rpurdie@rpsys.net> Cc: Grant Likely <grant.likely@secretlab.ca> Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> Cc: Jan Weitzel <j.weitzel@phytec.de> Cc: Juergen Kilb <j.kilb@phytec.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/leds/Kconfig')
-rw-r--r--drivers/leds/Kconfig10
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/leds/Kconfig b/drivers/leds/Kconfig
index 9bec8699b8a3..09de8dac8a73 100644
--- a/drivers/leds/Kconfig
+++ b/drivers/leds/Kconfig
@@ -162,6 +162,16 @@ config LEDS_PCA9532
162 LED controller. It is generally only useful 162 LED controller. It is generally only useful
163 as a platform driver 163 as a platform driver
164 164
165config LEDS_PCA9532_GPIO
166 bool "Enable GPIO support for PCA9532"
167 depends on LEDS_PCA9532
168 depends on GPIOLIB
169 help
170 Allow unused pins on PCA9532 to be used as gpio.
171
172 To use a pin as gpio pca9532_type in pca9532_platform data needs to
173 set to PCA9532_TYPE_GPIO.
174
165config LEDS_GPIO 175config LEDS_GPIO
166 tristate "LED Support for GPIO connected LEDs" 176 tristate "LED Support for GPIO connected LEDs"
167 depends on LEDS_CLASS 177 depends on LEDS_CLASS