diff options
Diffstat (limited to 'include/linux/cpuidle.h')
-rw-r--r-- | include/linux/cpuidle.h | 25 |
1 files changed, 11 insertions, 14 deletions
diff --git a/include/linux/cpuidle.h b/include/linux/cpuidle.h index 480c14dc1ddd..8f0406230a0a 100644 --- a/include/linux/cpuidle.h +++ b/include/linux/cpuidle.h | |||
@@ -17,7 +17,7 @@ | |||
17 | #include <linux/completion.h> | 17 | #include <linux/completion.h> |
18 | #include <linux/hrtimer.h> | 18 | #include <linux/hrtimer.h> |
19 | 19 | ||
20 | #define CPUIDLE_STATE_MAX 8 | 20 | #define CPUIDLE_STATE_MAX 10 |
21 | #define CPUIDLE_NAME_LEN 16 | 21 | #define CPUIDLE_NAME_LEN 16 |
22 | #define CPUIDLE_DESC_LEN 32 | 22 | #define CPUIDLE_DESC_LEN 32 |
23 | 23 | ||
@@ -57,6 +57,7 @@ struct cpuidle_state { | |||
57 | /* Idle State Flags */ | 57 | /* Idle State Flags */ |
58 | #define CPUIDLE_FLAG_TIME_VALID (0x01) /* is residency time measurable? */ | 58 | #define CPUIDLE_FLAG_TIME_VALID (0x01) /* is residency time measurable? */ |
59 | #define CPUIDLE_FLAG_COUPLED (0x02) /* state applies to multiple cpus */ | 59 | #define CPUIDLE_FLAG_COUPLED (0x02) /* state applies to multiple cpus */ |
60 | #define CPUIDLE_FLAG_TIMER_STOP (0x04) /* timer is stopped on this state */ | ||
60 | 61 | ||
61 | #define CPUIDLE_DRIVER_FLAGS_MASK (0xFFFF0000) | 62 | #define CPUIDLE_DRIVER_FLAGS_MASK (0xFFFF0000) |
62 | 63 | ||
@@ -104,8 +105,8 @@ struct cpuidle_driver { | |||
104 | struct module *owner; | 105 | struct module *owner; |
105 | int refcnt; | 106 | int refcnt; |
106 | 107 | ||
107 | /* set to 1 to use the core cpuidle time keeping (for all states). */ | 108 | /* used by the cpuidle framework to setup the broadcast timer */ |
108 | unsigned int en_core_tk_irqen:1; | 109 | unsigned int bctimer:1; |
109 | /* states array must be ordered in decreasing power consumption */ | 110 | /* states array must be ordered in decreasing power consumption */ |
110 | struct cpuidle_state states[CPUIDLE_STATE_MAX]; | 111 | struct cpuidle_state states[CPUIDLE_STATE_MAX]; |
111 | int state_count; | 112 | int state_count; |
@@ -122,17 +123,15 @@ extern void cpuidle_driver_unref(void); | |||
122 | extern void cpuidle_unregister_driver(struct cpuidle_driver *drv); | 123 | extern void cpuidle_unregister_driver(struct cpuidle_driver *drv); |
123 | extern int cpuidle_register_device(struct cpuidle_device *dev); | 124 | extern int cpuidle_register_device(struct cpuidle_device *dev); |
124 | extern void cpuidle_unregister_device(struct cpuidle_device *dev); | 125 | extern void cpuidle_unregister_device(struct cpuidle_device *dev); |
125 | 126 | extern int cpuidle_register(struct cpuidle_driver *drv, | |
127 | const struct cpumask *const coupled_cpus); | ||
128 | extern void cpuidle_unregister(struct cpuidle_driver *drv); | ||
126 | extern void cpuidle_pause_and_lock(void); | 129 | extern void cpuidle_pause_and_lock(void); |
127 | extern void cpuidle_resume_and_unlock(void); | 130 | extern void cpuidle_resume_and_unlock(void); |
128 | extern void cpuidle_pause(void); | 131 | extern void cpuidle_pause(void); |
129 | extern void cpuidle_resume(void); | 132 | extern void cpuidle_resume(void); |
130 | extern int cpuidle_enable_device(struct cpuidle_device *dev); | 133 | extern int cpuidle_enable_device(struct cpuidle_device *dev); |
131 | extern void cpuidle_disable_device(struct cpuidle_device *dev); | 134 | extern void cpuidle_disable_device(struct cpuidle_device *dev); |
132 | extern int cpuidle_wrap_enter(struct cpuidle_device *dev, | ||
133 | struct cpuidle_driver *drv, int index, | ||
134 | int (*enter)(struct cpuidle_device *dev, | ||
135 | struct cpuidle_driver *drv, int index)); | ||
136 | extern int cpuidle_play_dead(void); | 135 | extern int cpuidle_play_dead(void); |
137 | 136 | ||
138 | extern struct cpuidle_driver *cpuidle_get_cpu_driver(struct cpuidle_device *dev); | 137 | extern struct cpuidle_driver *cpuidle_get_cpu_driver(struct cpuidle_device *dev); |
@@ -151,7 +150,10 @@ static inline void cpuidle_unregister_driver(struct cpuidle_driver *drv) { } | |||
151 | static inline int cpuidle_register_device(struct cpuidle_device *dev) | 150 | static inline int cpuidle_register_device(struct cpuidle_device *dev) |
152 | {return -ENODEV; } | 151 | {return -ENODEV; } |
153 | static inline void cpuidle_unregister_device(struct cpuidle_device *dev) { } | 152 | static inline void cpuidle_unregister_device(struct cpuidle_device *dev) { } |
154 | 153 | static inline int cpuidle_register(struct cpuidle_driver *drv, | |
154 | const struct cpumask *const coupled_cpus) | ||
155 | {return -ENODEV; } | ||
156 | static inline void cpuidle_unregister(struct cpuidle_driver *drv) { } | ||
155 | static inline void cpuidle_pause_and_lock(void) { } | 157 | static inline void cpuidle_pause_and_lock(void) { } |
156 | static inline void cpuidle_resume_and_unlock(void) { } | 158 | static inline void cpuidle_resume_and_unlock(void) { } |
157 | static inline void cpuidle_pause(void) { } | 159 | static inline void cpuidle_pause(void) { } |
@@ -159,11 +161,6 @@ static inline void cpuidle_resume(void) { } | |||
159 | static inline int cpuidle_enable_device(struct cpuidle_device *dev) | 161 | static inline int cpuidle_enable_device(struct cpuidle_device *dev) |
160 | {return -ENODEV; } | 162 | {return -ENODEV; } |
161 | static inline void cpuidle_disable_device(struct cpuidle_device *dev) { } | 163 | static inline void cpuidle_disable_device(struct cpuidle_device *dev) { } |
162 | static inline int cpuidle_wrap_enter(struct cpuidle_device *dev, | ||
163 | struct cpuidle_driver *drv, int index, | ||
164 | int (*enter)(struct cpuidle_device *dev, | ||
165 | struct cpuidle_driver *drv, int index)) | ||
166 | { return -ENODEV; } | ||
167 | static inline int cpuidle_play_dead(void) {return -ENODEV; } | 164 | static inline int cpuidle_play_dead(void) {return -ENODEV; } |
168 | #endif | 165 | #endif |
169 | 166 | ||