[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1542823301-23563-6-git-send-email-l.luba@partner.samsung.com>
Date: Wed, 21 Nov 2018 19:01:40 +0100
From: Lukasz Luba <l.luba@...tner.samsung.com>
To: linux-arm-kernel@...ts.infradead.org,
linux-samsung-soc@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-pm@...r.kernel.org, devicetree@...r.kernel.org
Cc: tjakobi@...h.uni-bielefeld.de, myungjoo.ham@...sung.com,
kyungmin.park@...sung.com, cw00.choi@...sung.com,
rjw@...ysocki.net, len.brown@...el.com, pavel@....cz,
gregkh@...uxfoundation.org, keescook@...omium.org,
anton@...msg.org, ccross@...roid.com, tony.luck@...el.com,
robh+dt@...nel.org, mark.rutland@....com, kgene@...nel.org,
krzk@...nel.org, m.szyprowski@...sung.com,
b.zolnierkie@...sung.com, Lukasz Luba <l.luba@...tner.samsung.com>
Subject: [PATCH 5/6] drivers: power: suspend: call devfreq suspend/resume
Devfreq framework supports suspend of its devices.
Call the the devfreq interface and allow devfreq devices preserve/restore
their states during suspend/resume.
The patch draws on Tobias Jakobi's work posted ~2 years ago, who tried to
solve issue with devfreq device's frequency during suspend/resume.
During the discussion on LKML some corner cases and comments appeared
related to the design. This patch address them keeping in mind suggestions
from Chanwoo Choi.
Suggested-by: Tobias Jakobi <tjakobi@...h.uni-bielefeld.de>
Signed-off-by: Lukasz Luba <l.luba@...tner.samsung.com>
---
drivers/base/power/main.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/base/power/main.c b/drivers/base/power/main.c
index a690fd4..0992e67 100644
--- a/drivers/base/power/main.c
+++ b/drivers/base/power/main.c
@@ -32,6 +32,7 @@
#include <trace/events/power.h>
#include <linux/cpufreq.h>
#include <linux/cpuidle.h>
+#include <linux/devfreq.h>
#include <linux/timer.h>
#include "../base.h"
@@ -1078,6 +1079,7 @@ void dpm_resume(pm_message_t state)
dpm_show_time(starttime, state, 0, NULL);
cpufreq_resume();
+ devfreq_resume();
trace_suspend_resume(TPS("dpm_resume"), state.event, false);
}
@@ -1852,6 +1854,7 @@ int dpm_suspend(pm_message_t state)
trace_suspend_resume(TPS("dpm_suspend"), state.event, true);
might_sleep();
+ devfreq_suspend();
cpufreq_suspend();
mutex_lock(&dpm_list_mtx);
--
2.7.4
Powered by blists - more mailing lists