diff mbox

[2/2] cpufreq: exynos: Frequency lock should be considered in hibernation also.

Message ID 1385386770-4118-1-git-send-email-jhbird.choi@samsung.com (mailing list archive)
State Not Applicable, archived
Headers show

Commit Message

jonghwan Choi Nov. 25, 2013, 1:39 p.m. UTC
The Frequency lock value should be higher or same than the booting frequency,
which is set by the bootloader. To eliminate possible inconsistency
in frequency, we save and restore frequency during suspend & resume
and disable CPUFREQ activity. This should be considered in hibernation also.

Signed-off-by: Jonghwan Choi <jhbird.choi@samsung.com>
---
 drivers/cpufreq/exynos-cpufreq.c | 3 +++
 1 file changed, 3 insertions(+)
diff mbox

Patch

diff --git a/drivers/cpufreq/exynos-cpufreq.c b/drivers/cpufreq/exynos-cpufreq.c
index f3c2287..cd05b0a 100644
--- a/drivers/cpufreq/exynos-cpufreq.c
+++ b/drivers/cpufreq/exynos-cpufreq.c
@@ -187,6 +187,7 @@  static int exynos_cpufreq_pm_notifier(struct notifier_block *notifier,
 	int ret;
 
 	switch (pm_event) {
+	case PM_HIBERNATION_PREPARE:
 	case PM_SUSPEND_PREPARE:
 		mutex_lock(&cpufreq_lock);
 		frequency_locked = true;
@@ -198,6 +199,8 @@  static int exynos_cpufreq_pm_notifier(struct notifier_block *notifier,
 
 		break;
 
+	case PM_POST_HIBERNATION:
+	case PM_POST_RESTORE:
 	case PM_POST_SUSPEND:
 		mutex_lock(&cpufreq_lock);
 		frequency_locked = false;