diff options
author | Felipe Balbi <me@felipe.balbi.com> | 2009-02-17 13:18:11 +0200 |
---|---|---|
committer | Richard Purdie <rpurdie@linux.intel.com> | 2009-04-06 16:06:26 +0100 |
commit | 17354bfe85275f1bdde7f4a27ebc1ba53e053939 (patch) | |
tree | 15a6a5dc4b353ccd15fe5afcd977d953caac9bd8 /drivers/leds/Kconfig | |
parent | ac67e23bed58a0e34a8cb9ecd1de6c78569f8ef2 (diff) | |
download | linux-3.10-17354bfe85275f1bdde7f4a27ebc1ba53e053939.tar.gz linux-3.10-17354bfe85275f1bdde7f4a27ebc1ba53e053939.tar.bz2 linux-3.10-17354bfe85275f1bdde7f4a27ebc1ba53e053939.zip |
leds: Add gpio-led trigger
The gpio led trigger will allow leds to be triggered by
gpio events.
When we give the led a gpio number, the trigger will
request_irq() on that so we don't have to keep polling
for gpio state.
It's useful for usecases as n810's keypad leds that could
be triggered by the gpio event generated when user slides
up to show the keypad.
We also provide means for userland to tell us what is the
desired brightness for that special led when it goes on
so userland could use information from ambient light sensors
and not set led brightness too high if it's not necessary.
Signed-off-by: Felipe Balbi <me@felipebalbi.com>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
Diffstat (limited to 'drivers/leds/Kconfig')
-rw-r--r-- | drivers/leds/Kconfig | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/drivers/leds/Kconfig b/drivers/leds/Kconfig index db5e6a64c7c..9c131f30757 100644 --- a/drivers/leds/Kconfig +++ b/drivers/leds/Kconfig @@ -255,6 +255,19 @@ config LEDS_TRIGGER_BACKLIGHT If unsure, say N. +config LEDS_TRIGGER_GPIO + tristate "LED GPIO Trigger" + depends on LEDS_TRIGGERS + depends on GPIOLIB + help + This allows LEDs to be controlled by gpio events. It's good + when using gpios as switches and triggering the needed LEDs + from there. One use case is n810's keypad LEDs that could + be triggered by this trigger when user slides up to show + keypad. + + If unsure, say N. + config LEDS_TRIGGER_DEFAULT_ON tristate "LED Default ON Trigger" depends on LEDS_TRIGGERS |