From: Robin Gong <b38343@freescale.com>
To: rob.herring@calxeda.com, pawel.moll@arm.com,
mark.rutland@arm.com, ijc+devicetree@hellion.org.uk,
galak@codeaurora.org, rob@landley.net, cooloney@gmail.com,
rpurdie@rpsys.net, grant.likely@linaro.org
Cc: devicetree@vger.kernel.org, linux-doc@vger.kernel.org,
linux-kernel@vger.kernel.org, linux-leds@vger.kernel.org
Subject: [PATCH v1 1/2] leds: leds-gpio: add retain-state-suspended property
Date: Mon, 20 Jan 2014 19:41:26 +0800 [thread overview]
Message-ID: <1390218087-14597-1-git-send-email-b38343@freescale.com> (raw)
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
next reply other threads:[~2014-01-20 11:36 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-01-20 11:41 Robin Gong [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1390218087-14597-1-git-send-email-b38343@freescale.com \
--to=b38343@freescale.com \
--cc=cooloney@gmail.com \
--cc=devicetree@vger.kernel.org \
--cc=galak@codeaurora.org \
--cc=grant.likely@linaro.org \
--cc=ijc+devicetree@hellion.org.uk \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-leds@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=pawel.moll@arm.com \
--cc=rob.herring@calxeda.com \
--cc=rob@landley.net \
--cc=rpurdie@rpsys.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).