aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm')
-rw-r--r--arch/arm/Kconfig3
-rw-r--r--arch/arm/mach-at91/pm.c17
2 files changed, 16 insertions, 4 deletions
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index 5d5997ca7011..4b1a8e3d292c 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -1030,6 +1030,9 @@ menu "Power management options"
1030 1030
1031source "kernel/power/Kconfig" 1031source "kernel/power/Kconfig"
1032 1032
1033config ARCH_SUSPEND_POSSIBLE
1034 def_bool y
1035
1033endmenu 1036endmenu
1034 1037
1035source "net/Kconfig" 1038source "net/Kconfig"
diff --git a/arch/arm/mach-at91/pm.c b/arch/arm/mach-at91/pm.c
index 4b120cc36135..a67defd50438 100644
--- a/arch/arm/mach-at91/pm.c
+++ b/arch/arm/mach-at91/pm.c
@@ -52,7 +52,7 @@ static suspend_state_t target_state;
52/* 52/*
53 * Called after processes are frozen, but before we shutdown devices. 53 * Called after processes are frozen, but before we shutdown devices.
54 */ 54 */
55static int at91_pm_set_target(suspend_state_t state) 55static int at91_pm_begin(suspend_state_t state)
56{ 56{
57 target_state = state; 57 target_state = state;
58 return 0; 58 return 0;
@@ -202,11 +202,20 @@ error:
202 return 0; 202 return 0;
203} 203}
204 204
205/*
206 * Called right prior to thawing processes.
207 */
208static void at91_pm_end(void)
209{
210 target_state = PM_SUSPEND_ON;
211}
212
205 213
206static struct platform_suspend_ops at91_pm_ops ={ 214static struct platform_suspend_ops at91_pm_ops ={
207 .valid = at91_pm_valid_state, 215 .valid = at91_pm_valid_state,
208 .set_target = at91_pm_set_target, 216 .begin = at91_pm_begin,
209 .enter = at91_pm_enter, 217 .enter = at91_pm_enter,
218 .end = at91_pm_end,
210}; 219};
211 220
212static int __init at91_pm_init(void) 221static int __init at91_pm_init(void)