1 // SPDX-License-Identifier: GPL-2.0 1 2 /* 3 * Suspend-to-RAM support code for SH-Mobile A 4 * 5 * Copyright (C) 2011 Magnus Damm 6 */ 7 8 #include <linux/pm.h> 9 #include <linux/suspend.h> 10 #include <linux/module.h> 11 #include <linux/err.h> 12 #include <linux/cpu.h> 13 14 #include <asm/io.h> 15 #include <asm/system_misc.h> 16 17 #include "common.h" 18 19 static int shmobile_suspend_default_enter(susp 20 { 21 cpu_do_idle(); 22 return 0; 23 } 24 25 static int shmobile_suspend_begin(suspend_stat 26 { 27 cpu_idle_poll_ctrl(true); 28 return 0; 29 } 30 31 static void shmobile_suspend_end(void) 32 { 33 cpu_idle_poll_ctrl(false); 34 } 35 36 struct platform_suspend_ops shmobile_suspend_o 37 .begin = shmobile_suspend_beg 38 .end = shmobile_suspend_end 39 .enter = shmobile_suspend_def 40 .valid = suspend_valid_only_m 41 }; 42 43 int __init shmobile_suspend_init(void) 44 { 45 suspend_set_ops(&shmobile_suspend_ops) 46 return 0; 47 } 48
Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.