1 // SPDX-License-Identifier: GPL-2.0
3 * Suspend-to-RAM support code for SH-Mobile ARM
5 * Copyright (C) 2011 Magnus Damm
9 #include <linux/suspend.h>
10 #include <linux/module.h>
11 #include <linux/err.h>
12 #include <linux/cpu.h>
15 #include <asm/system_misc.h>
19 static int shmobile_suspend_default_enter(suspend_state_t suspend_state
)
25 static int shmobile_suspend_begin(suspend_state_t state
)
27 cpu_idle_poll_ctrl(true);
31 static void shmobile_suspend_end(void)
33 cpu_idle_poll_ctrl(false);
36 struct platform_suspend_ops shmobile_suspend_ops
= {
37 .begin
= shmobile_suspend_begin
,
38 .end
= shmobile_suspend_end
,
39 .enter
= shmobile_suspend_default_enter
,
40 .valid
= suspend_valid_only_mem
,
43 int __init
shmobile_suspend_init(void)
45 suspend_set_ops(&shmobile_suspend_ops
);