Skip to content

Commit bc7115b

Browse files
spandruvadarafaeljw
authored andcommitted
PM / sleep: Support freeze as test_suspend option
Added freeze as one of the option for test_suspend boot param. Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
1 parent 2b4f431 commit bc7115b

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

kernel/power/suspend_test.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,14 @@ static void __init test_wakealarm(struct rtc_device *rtc, suspend_state_t state)
100100
if (state == PM_SUSPEND_STANDBY) {
101101
printk(info_test, pm_states[state]);
102102
status = pm_suspend(state);
103+
if (status < 0)
104+
state = PM_SUSPEND_FREEZE;
103105
}
106+
if (state == PM_SUSPEND_FREEZE) {
107+
printk(info_test, pm_states[state]);
108+
status = pm_suspend(state);
109+
}
110+
104111
if (status < 0)
105112
printk(err_suspend, status);
106113

0 commit comments

Comments
 (0)