summaryrefslogtreecommitdiff
path: root/drivers/leds/Kconfig
diff options
context:
space:
mode:
authorCédric Le Goater <clg@kaod.org>2017-08-08 16:42:39 +0300
committerJacek Anaszewski <jacek.anaszewski@gmail.com>2017-08-14 23:22:37 +0300
commit561099a1a2e992a482a8318c0c9c5af26222e5cd (patch)
tree1fab407e2140c2efdb5e005a4302d576d6613d33 /drivers/leds/Kconfig
parent91940bb4ca7b7f1b5426cc14bdbd0c7f8347683f (diff)
downloadlinux-561099a1a2e992a482a8318c0c9c5af26222e5cd.tar.xz
leds: pca955x: add GPIO support
The PCA955x family of chips are I2C LED blinkers whose pins not used to control LEDs can be used as general purpose I/Os (GPIOs). The following adds such a support by defining different operation modes for the pins (See bindings documentation for more details). The pca955x driver is then extended with a gpio_chip when some of pins are operating as GPIOs. The default operating mode is to behave as a LED. The GPIO support is conditioned by CONFIG_LEDS_PCA955X_GPIO. Signed-off-by: Cédric Le Goater <clg@kaod.org> Acked-by: Pavel Machek <pavel@ucw.cz> Signed-off-by: Jacek Anaszewski <jacek.anaszewski@gmail.com>
Diffstat (limited to 'drivers/leds/Kconfig')
-rw-r--r--drivers/leds/Kconfig11
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/leds/Kconfig b/drivers/leds/Kconfig
index 594b24d410c3..3013cd35c65e 100644
--- a/drivers/leds/Kconfig
+++ b/drivers/leds/Kconfig
@@ -377,6 +377,17 @@ config LEDS_PCA955X
LED driver chips accessed via the I2C bus. Supported
devices include PCA9550, PCA9551, PCA9552, and PCA9553.
+config LEDS_PCA955X_GPIO
+ bool "Enable GPIO support for PCA955X"
+ depends on LEDS_PCA955X
+ depends on GPIOLIB
+ help
+ Allow unused pins on PCA955X to be used as gpio.
+
+ To use a pin as gpio the pin type should be set to
+ PCA955X_TYPE_GPIO in the device tree.
+
+
config LEDS_PCA963X
tristate "LED support for PCA963x I2C chip"
depends on LEDS_CLASS