blob: 71ad1a4c90511b33824d05ac1936132da32a46b3 [file] [log] [blame]
Nicholas Flintham1e3d3112013-04-10 10:48:38 +01001/*
2 * Copyright (C) 2011 Google, Inc.
3 *
4 * Author:
5 * Colin Cross <ccross@android.com>
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#ifndef _LINUX_CPU_PM_H
19#define _LINUX_CPU_PM_H
20
21#include <linux/kernel.h>
22#include <linux/notifier.h>
23
24
25enum cpu_pm_event {
26
27 CPU_PM_ENTER,
28
29
30 CPU_PM_ENTER_FAILED,
31
32
33 CPU_PM_EXIT,
34
35
36 CPU_CLUSTER_PM_ENTER,
37
38
39 CPU_CLUSTER_PM_ENTER_FAILED,
40
41
42 CPU_CLUSTER_PM_EXIT,
43};
44
45#ifdef CONFIG_CPU_PM
46int cpu_pm_register_notifier(struct notifier_block *nb);
47int cpu_pm_unregister_notifier(struct notifier_block *nb);
48int cpu_pm_enter(void);
49int cpu_pm_exit(void);
50int cpu_cluster_pm_enter(void);
51int cpu_cluster_pm_exit(void);
52
53#else
54
55static inline int cpu_pm_register_notifier(struct notifier_block *nb)
56{
57 return 0;
58}
59
60static inline int cpu_pm_unregister_notifier(struct notifier_block *nb)
61{
62 return 0;
63}
64
65static inline int cpu_pm_enter(void)
66{
67 return 0;
68}
69
70static inline int cpu_pm_exit(void)
71{
72 return 0;
73}
74
75static inline int cpu_cluster_pm_enter(void)
76{
77 return 0;
78}
79
80static inline int cpu_cluster_pm_exit(void)
81{
82 return 0;
83}
84#endif
85#endif