All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ARM: davinci: enable PM for DT boot
@ 2016-10-25 21:47 Kevin Hilman
  2016-10-28 12:10 ` Sekhar Nori
  0 siblings, 1 reply; 7+ messages in thread
From: Kevin Hilman @ 2016-10-25 21:47 UTC (permalink / raw)
  To: linux-arm-kernel

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

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

end of thread, other threads:[~2016-11-14  9:25 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-10-25 21:47 [PATCH] ARM: davinci: enable PM for DT boot Kevin Hilman
2016-10-28 12:10 ` 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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.