summaryrefslogtreecommitdiffstats
path: root/drivers/leds
diff options
context:
space:
mode:
authorRobin Gong <b38343@freescale.com>2014-01-20 03:41:26 -0800
committerBryan Wu <cooloney@gmail.com>2014-02-27 09:56:56 -0800
commit4270a78d23eece0b25a13bff1e71d114ec547de4 (patch)
tree95df7c93fbfc6d3e9e2dafc52767c490dc45df93 /drivers/leds
parent25c6579f872d0542809067d56fad22984b8ff565 (diff)
leds: leds-gpio: add retain-state-suspended property
Some gpio-leds need retain the state even in suspend, such as charger led. But this property missed in devicetree, add it. (cooloney@gmail.com: fold DT binding updates into this patch) Signed-off-by: Robin Gong <b38343@freescale.com> Signed-off-by: Bryan Wu <cooloney@gmail.com>
Diffstat (limited to 'drivers/leds')
-rw-r--r--drivers/leds/leds-gpio.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/leds/leds-gpio.c b/drivers/leds/leds-gpio.c
index 78b0e273a90..1bb3f1ab1d9 100644
--- a/drivers/leds/leds-gpio.c
+++ b/drivers/leds/leds-gpio.c
@@ -204,6 +204,9 @@ static struct gpio_leds_priv *gpio_leds_create_of(struct platform_device *pdev)
led.default_state = LEDS_GPIO_DEFSTATE_OFF;
}
+ if (of_get_property(child, "retain-state-suspended", NULL))
+ led.retain_state_suspended = 1;
+
ret = create_gpio_led(&led, &priv->leds[priv->num_leds++],
&pdev->dev, NULL);
if (ret < 0) {