• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /* arch/arm/mach-msm/pm.c
2  *
3  * Goldfish Power Management Routines
4  *
5  * Copyright (C) 2007 Google, Inc.
6  *
7  * This software is licensed under the terms of the GNU General Public
8  * License version 2, as published by the Free Software Foundation, and
9  * may be copied, distributed, and modified under those terms.
10  *
11  * This program is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14  * GNU General Public License for more details.
15  *
16  */
17 
18 #include <linux/module.h>
19 #include <linux/kernel.h>
20 #include <linux/init.h>
21 #include <linux/pm.h>
22 #include <linux/suspend.h>
23 
24 extern void (*cpu_wait)(void);
25 
goldfish_pm_enter(suspend_state_t state)26 static int goldfish_pm_enter(suspend_state_t state)
27 {
28 	if (cpu_wait)
29 		(*cpu_wait)();
30 	return 0;
31 }
32 
33 static struct platform_suspend_ops goldfish_pm_ops = {
34 	.enter		= goldfish_pm_enter,
35 	.valid		= suspend_valid_only_mem,
36 };
37 
goldfish_pm_init(void)38 static int __init goldfish_pm_init(void)
39 {
40 	suspend_set_ops(&goldfish_pm_ops);
41 	return 0;
42 }
43 
44 device_initcall(goldfish_pm_init);
45 
46