diff options
author | Zhou Jingyu <b02241@freescale.com> | 2011-01-24 15:09:22 +0800 |
---|---|---|
committer | Zhou Jingyu <b02241@freescale.com> | 2011-01-24 15:31:17 +0800 |
commit | c0c763f0ff11673ce413ebf1169109e91ddc0cc9 (patch) | |
tree | d04deda866d4014266689cf36109d25fdfd670a0 | |
parent | 856d40b021f833f9decef13b57d54a5d80ffd097 (diff) |
ENGR00138425 MX53 LOCO/SMD: Only preset voltage for suspend to mem mode
Only preset voltage for suspend to mem mode
Signed-off-by: Zhou Jingyu <Jingyu.Zhou@freescale.com>
-rw-r--r-- | arch/arm/mach-mx5/pm.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/arch/arm/mach-mx5/pm.c b/arch/arm/mach-mx5/pm.c index c2b10ce24502..0542d83a5f2c 100644 --- a/arch/arm/mach-mx5/pm.c +++ b/arch/arm/mach-mx5/pm.c @@ -144,6 +144,17 @@ static int mx5_suspend_enter(suspend_state_t state) return 0; } +static int mx5_suspend_begin(suspend_state_t state) +{ + if (machine_is_mx53_loco() || + machine_is_mx53_smd()) { + if (PM_SUSPEND_MEM == state) + regulator_suspend_prepare( + PM_SUSPEND_MEM); + } + return 0; +} + /* * Called after processes are frozen, but before we shut down devices. */ @@ -175,7 +186,6 @@ static int mx5_suspend_prepare(void) cpufreq_notify_transition(&freqs, CPUFREQ_POSTCHANGE); } #endif - regulator_suspend_prepare(PM_SUSPEND_MEM); return 0; } @@ -216,6 +226,7 @@ static int mx5_pm_valid(suspend_state_t state) struct platform_suspend_ops mx5_suspend_ops = { .valid = mx5_pm_valid, + .begin = mx5_suspend_begin, .prepare = mx5_suspend_prepare, .enter = mx5_suspend_enter, .finish = mx5_suspend_finish, |