mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 03:01:39 -04:00
Merge back earlier suspend/hibernate material for v4.1.
This commit is contained in:
commit
be77002101
9 changed files with 106 additions and 22 deletions
|
|
@ -11,7 +11,7 @@
|
|||
#include <linux/export.h>
|
||||
#include <linux/kobject.h>
|
||||
#include <linux/string.h>
|
||||
#include <linux/resume-trace.h>
|
||||
#include <linux/pm-trace.h>
|
||||
#include <linux/workqueue.h>
|
||||
#include <linux/debugfs.h>
|
||||
#include <linux/seq_file.h>
|
||||
|
|
|
|||
|
|
@ -28,6 +28,7 @@
|
|||
#include <linux/ftrace.h>
|
||||
#include <trace/events/power.h>
|
||||
#include <linux/compiler.h>
|
||||
#include <linux/moduleparam.h>
|
||||
|
||||
#include "power.h"
|
||||
|
||||
|
|
@ -233,12 +234,20 @@ static bool platform_suspend_again(suspend_state_t state)
|
|||
suspend_ops->suspend_again() : false;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_PM_DEBUG
|
||||
static unsigned int pm_test_delay = 5;
|
||||
module_param(pm_test_delay, uint, 0644);
|
||||
MODULE_PARM_DESC(pm_test_delay,
|
||||
"Number of seconds to wait before resuming from suspend test");
|
||||
#endif
|
||||
|
||||
static int suspend_test(int level)
|
||||
{
|
||||
#ifdef CONFIG_PM_DEBUG
|
||||
if (pm_test_level == level) {
|
||||
printk(KERN_INFO "suspend debug: Waiting for 5 seconds.\n");
|
||||
mdelay(5000);
|
||||
printk(KERN_INFO "suspend debug: Waiting for %d second(s).\n",
|
||||
pm_test_delay);
|
||||
mdelay(pm_test_delay * 1000);
|
||||
return 1;
|
||||
}
|
||||
#endif /* !CONFIG_PM_DEBUG */
|
||||
|
|
|
|||
Loading…
Reference in a new issue