linux-leds.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v1 1/2] leds: leds-gpio: add retain-state-suspended property
@ 2014-01-20 11:41 Robin Gong
  2014-01-20 11:41 ` [PATCH v1 2/2] update binding doc of leds-gpio.txt Robin Gong
  2014-02-06 19:24 ` [PATCH v1 1/2] leds: leds-gpio: add retain-state-suspended property Bryan Wu
  0 siblings, 2 replies; 3+ messages in thread
From: Robin Gong @ 2014-01-20 11:41 UTC (permalink / raw)
  To: rob.herring, pawel.moll, mark.rutland, ijc+devicetree, galak, rob,
	cooloney, rpurdie, grant.likely
  Cc: devicetree, linux-doc, linux-kernel, linux-leds

Some gpio-leds need retain the state even in suspend, such as charger led.
But this property missed in devicetree, add it.

Signed-off-by: Robin Gong <b38343@freescale.com>
---
 drivers/leds/leds-gpio.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/drivers/leds/leds-gpio.c b/drivers/leds/leds-gpio.c
index 78b0e27..1bb3f1a 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) {
-- 
1.7.5.4

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-02-06 19:24 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-01-20 11:41 [PATCH v1 1/2] leds: leds-gpio: add retain-state-suspended property Robin Gong
2014-01-20 11:41 ` [PATCH v1 2/2] update binding doc of leds-gpio.txt Robin Gong
2014-02-06 19:24 ` [PATCH v1 1/2] leds: leds-gpio: add retain-state-suspended property Bryan Wu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).