2 * Suspend-to-RAM support code for SH-Mobile ARM
4 * Copyright (C) 2011 Magnus Damm
6 * This file is subject to the terms and conditions of the GNU General Public
7 * License. See the file "COPYING" in the main directory of this archive
12 #include <linux/suspend.h>
13 #include <linux/module.h>
14 #include <linux/err.h>
15 #include <linux/cpu.h>
18 #include <asm/system_misc.h>
22 static int shmobile_suspend_default_enter(suspend_state_t suspend_state
)
28 static int shmobile_suspend_begin(suspend_state_t state
)
30 cpu_idle_poll_ctrl(true);
34 static void shmobile_suspend_end(void)
36 cpu_idle_poll_ctrl(false);
39 struct platform_suspend_ops shmobile_suspend_ops
= {
40 .begin
= shmobile_suspend_begin
,
41 .end
= shmobile_suspend_end
,
42 .enter
= shmobile_suspend_default_enter
,
43 .valid
= suspend_valid_only_mem
,
46 int __init
shmobile_suspend_init(void)
48 suspend_set_ops(&shmobile_suspend_ops
);