]> pilppa.com Git - linux-2.6-omap-h63xx.git/commit
leds: Add gpio-led trigger
authorFelipe Balbi <me@felipe.balbi.com>
Tue, 17 Feb 2009 11:18:11 +0000 (13:18 +0200)
committerRichard Purdie <rpurdie@linux.intel.com>
Mon, 6 Apr 2009 15:06:26 +0000 (16:06 +0100)
commit17354bfe85275f1bdde7f4a27ebc1ba53e053939
tree15a6a5dc4b353ccd15fe5afcd977d953caac9bd8
parentac67e23bed58a0e34a8cb9ecd1de6c78569f8ef2
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>
drivers/leds/Kconfig
drivers/leds/Makefile
drivers/leds/ledtrig-gpio.c [new file with mode: 0644]