aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/leds
diff options
context:
space:
mode:
authorRichard Purdie <rpurdie@linux.intel.com>2009-02-17 15:04:07 +0000
committerRichard Purdie <rpurdie@linux.intel.com>2009-04-06 16:06:26 +0100
commitdefb512d2576992c63ba1c18c24eea31cfeaa26e (patch)
treeeb2ae7031d62073d452d55192167e66767e99faa /drivers/leds
parent41c42ff5dbe29b7b826e6736f960959c76e7acf0 (diff)
downloadkernel_samsung_aries-defb512d2576992c63ba1c18c24eea31cfeaa26e.zip
kernel_samsung_aries-defb512d2576992c63ba1c18c24eea31cfeaa26e.tar.gz
kernel_samsung_aries-defb512d2576992c63ba1c18c24eea31cfeaa26e.tar.bz2
leds: Add suspend/resume state flags to leds-gpio
Add an option to preserve LED state when suspending/resuming to the LED gpio driver. Based on a suggestion from Robert Jarzmik. Tested-by: Robert Jarzmik <robert.jarzmik@free.fr> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
Diffstat (limited to 'drivers/leds')
-rw-r--r--drivers/leds/leds-gpio.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/leds/leds-gpio.c b/drivers/leds/leds-gpio.c
index 0daa2d2..8fa352a 100644
--- a/drivers/leds/leds-gpio.c
+++ b/drivers/leds/leds-gpio.c
@@ -93,7 +93,8 @@ static int __devinit create_gpio_led(const struct gpio_led *template,
}
led_dat->cdev.brightness_set = gpio_led_set;
led_dat->cdev.brightness = LED_OFF;
- led_dat->cdev.flags |= LED_CORE_SUSPENDRESUME;
+ if (!template->retain_state_suspended)
+ led_dat->cdev.flags |= LED_CORE_SUSPENDRESUME;
ret = gpio_direction_output(led_dat->gpio, led_dat->active_low);
if (ret < 0)