From 4270a78d23eece0b25a13bff1e71d114ec547de4 Mon Sep 17 00:00:00 2001 From: Robin Gong Date: Mon, 20 Jan 2014 03:41:26 -0800 Subject: 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 Signed-off-by: Bryan Wu --- drivers/leds/leds-gpio.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'drivers/leds/leds-gpio.c') diff --git a/drivers/leds/leds-gpio.c b/drivers/leds/leds-gpio.c index 78b0e273a903..1bb3f1ab1d91 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) { -- cgit v1.2.3-59-g8ed1b