diff mbox

[2/4] cpufreq: exynos: Consider hibernation in pm notifier

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

Commit Message

jonghwan Choi Nov. 19, 2013, 1:29 p.m. UTC
Frequency lock should be considered in suspend/hibernation.

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

Comments

Viresh Kumar Nov. 19, 2013, 2:32 p.m. UTC | #1
On 19 November 2013 18:59, Jonghwan Choi <jhbird.choi@gmail.com> wrote:
> Frequency lock should be considered in suspend/hibernation.

These could turn out to be important logs for future. Please write
with more effort..

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

@Rafael: So we have few more drivers which are already doing such
stuff (even tegra as well)..
--
To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
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;