Lines Matching +full:suspend +full:- +full:to +full:- +full:ram
1 // SPDX-License-Identifier: GPL-2.0-only
3 * kernel/power/suspend_test.c - Suspend to RAM and standby test facility.
14 * We test the system suspend code by setting an RTC wakealarm a short
18 * The time it takes is system-specific though, so when we test this
31 * during the irqs-are-off stages of the suspend/resume cycle... in suspend_test_start()
38 long nj = jiffies - suspend_test_start_time; in suspend_test_finish()
45 /* Warning on suspend means the RTC alarm period needs to be in suspend_test_finish()
46 * larger -- the system was sooo slooowwww to suspend that the in suspend_test_finish()
47 * alarm (should have) fired before the system went to sleep! in suspend_test_finish()
49 * Warning on either suspend or resume also means the system in suspend_test_finish()
51 * is more likely to get the right attention than a printk... in suspend_test_finish()
58 * To test system suspend, we need a hands-off mechanism to resume the
59 * system. RTCs wake alarms are a common self-contained mechanism.
69 KERN_ERR "PM: suspend test failed, error %d\n"; in test_wakealarm()
71 KERN_INFO "PM: test RTC wakeup from '%s' suspend\n"; in test_wakealarm()
81 printk(err_readtime, dev_name(&rtc->dev), status); in test_wakealarm()
92 printk(err_wakealarm, dev_name(&rtc->dev), status); in test_wakealarm()
99 if (status == -ENODEV) in test_wakealarm()
122 * It's supposed to give oneshot behavior; cope. in test_wakealarm()
132 if (!test_bit(RTC_FEATURE_ALARM, candidate->features)) in has_wakealarm()
134 if (!device_may_wakeup(candidate->dev.parent)) in has_wakealarm()
141 * Kernel options like "test_suspend=mem" force suspend/resume sanity tests
148 KERN_WARNING "PM: can't test '%s' suspend state\n";
182 KERN_WARNING "PM: no wakealarm-capable RTC driver is ready\n"; in test_suspend()