From: khilman@baylibre.com (Kevin Hilman)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] ARM: davinci: enable PM for DT boot
Date: Tue, 25 Oct 2016 14:47:38 -0700 [thread overview]
Message-ID: <20161025214738.27744-1-khilman@baylibre.com> (raw)
Currently system PM is only enabled for legacy (non-DT) boot. Enable
for DT boot also.
Tested on da850-lcdk using "rtcwake -m mem -s5 -d rtc0".
Signed-off-by: Kevin Hilman <khilman@baylibre.com>
---
arch/arm/mach-davinci/da8xx-dt.c | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)
diff --git a/arch/arm/mach-davinci/da8xx-dt.c b/arch/arm/mach-davinci/da8xx-dt.c
index c9f7e9274aa8..a8089fa40d86 100644
--- a/arch/arm/mach-davinci/da8xx-dt.c
+++ b/arch/arm/mach-davinci/da8xx-dt.c
@@ -43,8 +43,26 @@ static struct of_dev_auxdata da850_auxdata_lookup[] __initdata = {
#ifdef CONFIG_ARCH_DAVINCI_DA850
+static struct davinci_pm_config da850_pm_pdata = {
+ .sleepcount = 128,
+};
+
+static struct platform_device da850_pm_device = {
+ .name = "pm-davinci",
+ .dev = {
+ .platform_data = &da850_pm_pdata,
+ },
+ .id = -1,
+};
+
static void __init da850_init_machine(void)
{
+ int ret;
+
+ ret = da850_register_pm(&da850_pm_device);
+ if (ret)
+ pr_warn("%s: suspend registration failed: %d\n", __func__, ret);
+
of_platform_default_populate(NULL, da850_auxdata_lookup, NULL);
}
--
2.9.3
next reply other threads:[~2016-10-25 21:47 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-10-25 21:47 Kevin Hilman [this message]
2016-10-28 12:10 ` [PATCH] ARM: davinci: enable PM for DT boot Sekhar Nori
2016-10-28 20:50 ` Kevin Hilman
2016-11-08 18:13 ` Kevin Hilman
2016-11-11 11:02 ` Sekhar Nori
2016-11-11 16:36 ` Kevin Hilman
2016-11-14 9:25 ` Sekhar Nori
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=20161025214738.27744-1-khilman@baylibre.com \
--to=khilman@baylibre.com \
--cc=linux-arm-kernel@lists.infradead.org \
/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