leds: leds-multi-gpio: Add multiple GPIOs LED driver
PATCH 1/1 leds: leds-multi-gpio: Add multiple GPIOs LED driver
From: Hermes Zhang <[email protected]>
Introduce a new multiple GPIOs LED driver. This LED will made of multiple GPIOs (up to 8) and will map different brightness to different GPIOs states which defined in dts file.
Signed-off-by Hermes Zhang <[email protected]>
--- drivers/leds/Kconfig | 12 +++ drivers/leds/Makefile | 1 + drivers/leds/leds-multi-gpio.c | 140 +++++++++++++++++++++++++++++++++ 3 files changed, 153 insertions(+) create mode 100644 drivers/leds/leds-multi-gpio.c
drivers/leds/Kconfig +12 -0
@@ -370,6 +370,18 @@ config LEDS_GPIO defined as platform devices and/or OpenFirmware platform devices. The code to use these bindings can be selected below. +config LEDS_MULTI_GPIO + tristate "LED Support for multiple GPIOs LED" + depends on LEDS_CLASS + depends on GPIOLIB + help + This option enables support for a multiple GPIOs LED. Such LED is made + of multiple GPIOs and could change the brightness by setting different + states of the GPIOs. + + To compile this driver as a module, choose M here: the + module will be called leds-multi-gpio. + config LEDS_LP3944 tristate "LED Support for N.S. LP3944 (Fun Light) I2C chip" depends on LEDS_CLASS
drivers/leds/Makefile +1 -0
@@ -30,6 +30,7 @@ obj-$(CONFIG_LEDS_DA903X) += leds-da903x.o obj-$(CONFIG_LEDS_DA9052) += leds-da9052.o obj-$(CONFIG_LEDS_FSG) += leds-fsg.o obj-$(CONFIG_LEDS_GPIO) += leds-gpio.o +obj-$(CONFIG_LEDS_MULTI_GPIO) += leds-multi-gpio.o obj-$(CONFIG_LEDS_GPIO_REGISTER) += leds-gpio-register.o obj-$(CONFIG_LEDS_HP6XX) += leds-hp6xx.o obj-$(CONFIG_LEDS_INTEL_SS4200) += leds-ss4200.o
drivers/leds/leds-multi-gpio.c new file +140 -0
140 lines not on this page · raw message
Signature · 1 line
2.20.1