aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/leds
diff options
context:
space:
mode:
authorRobin Gong <b38343@freescale.com>2014-01-20 21:41:46 -0500
committerNitin Garg <nitin.garg@freescale.com>2014-04-16 09:57:22 -0400
commit70b4703a460975c4f6061df638bec00ea1646e9b (patch)
tree5994a0c92ce7fcc885bd22bed43faa95dd20e738 /drivers/leds
parent818e6773768541819756768c00c965575a2dd984 (diff)
ENGR00295892-1: leds: leds-gpio: keep charger led state while system suspended
gpio-leds driver common framework didn't take care of this case if use CONFIG_OF , add property "retain-state-suspended" in dts and check it while gpio-leds device created. Signed-off-by: Robin Gong <b38343@freescale.com>
Diffstat (limited to 'drivers/leds')
-rw-r--r--drivers/leds/leds-gpio.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/leds/leds-gpio.c b/drivers/leds/leds-gpio.c
index b02b679abf31..e234d5e470a0 100644
--- a/drivers/leds/leds-gpio.c
+++ b/drivers/leds/leds-gpio.c
@@ -3,7 +3,7 @@
3 * 3 *
4 * Copyright (C) 2007 8D Technologies inc. 4 * Copyright (C) 2007 8D Technologies inc.
5 * Raphael Assenat <raph@8d.com> 5 * Raphael Assenat <raph@8d.com>
6 * Copyright (C) 2008 Freescale Semiconductor, Inc. 6 * Copyright (C) 2008, 2014 Freescale Semiconductor, Inc.
7 * 7 *
8 * This program is free software; you can redistribute it and/or modify 8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 as 9 * it under the terms of the GNU General Public License version 2 as
@@ -203,6 +203,8 @@ static struct gpio_leds_priv *gpio_leds_create_of(struct platform_device *pdev)
203 else 203 else
204 led.default_state = LEDS_GPIO_DEFSTATE_OFF; 204 led.default_state = LEDS_GPIO_DEFSTATE_OFF;
205 } 205 }
206 if (of_get_property(child, "retain-state-suspended", NULL))
207 led.retain_state_suspended = 1;
206 208
207 ret = create_gpio_led(&led, &priv->leds[priv->num_leds++], 209 ret = create_gpio_led(&led, &priv->leds[priv->num_leds++],
208 &pdev->dev, NULL); 210 &pdev->dev, NULL);