diff options
author | Andrey Konovalov <andrey.konovalov@linaro.org> | 2012-07-11 21:53:59 +0400 |
---|---|---|
committer | Andrey Konovalov <andrey.konovalov@linaro.org> | 2012-07-11 21:53:59 +0400 |
commit | f16f5280a9c36d47710017e5a9fffa467ade3a30 (patch) | |
tree | 2624e53e7e9e6e90d64d581121870c79136a205f /drivers/cpuidle/cpuidle.h | |
parent | 08b0e1b12f7c607f784e30105eb19cacb2f2b02b (diff) | |
parent | ca789c61deb0219cd3fefdb26090bbc9701deada (diff) |
Merge branch 'tracking-big-LITTLE-MP-v2' into merge-linux-linaro-core-trackingtracking-llct-ll-20120712.0tracking-llct-ll-20120711.0llct-20120711.0
Diffstat (limited to 'drivers/cpuidle/cpuidle.h')
-rw-r--r-- | drivers/cpuidle/cpuidle.h | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/drivers/cpuidle/cpuidle.h b/drivers/cpuidle/cpuidle.h index 7db186685c27..76e7f696ad8c 100644 --- a/drivers/cpuidle/cpuidle.h +++ b/drivers/cpuidle/cpuidle.h @@ -14,6 +14,8 @@ extern struct list_head cpuidle_detected_devices; extern struct mutex cpuidle_lock; extern spinlock_t cpuidle_driver_lock; extern int cpuidle_disabled(void); +extern int cpuidle_enter_state(struct cpuidle_device *dev, + struct cpuidle_driver *drv, int next_state); /* idle loop */ extern void cpuidle_install_idle_handler(void); @@ -30,4 +32,34 @@ extern void cpuidle_remove_state_sysfs(struct cpuidle_device *device); extern int cpuidle_add_sysfs(struct device *dev); extern void cpuidle_remove_sysfs(struct device *dev); +#ifdef CONFIG_ARCH_NEEDS_CPU_IDLE_COUPLED +bool cpuidle_state_is_coupled(struct cpuidle_device *dev, + struct cpuidle_driver *drv, int state); +int cpuidle_enter_state_coupled(struct cpuidle_device *dev, + struct cpuidle_driver *drv, int next_state); +int cpuidle_coupled_register_device(struct cpuidle_device *dev); +void cpuidle_coupled_unregister_device(struct cpuidle_device *dev); +#else +static inline bool cpuidle_state_is_coupled(struct cpuidle_device *dev, + struct cpuidle_driver *drv, int state) +{ + return false; +} + +static inline int cpuidle_enter_state_coupled(struct cpuidle_device *dev, + struct cpuidle_driver *drv, int next_state) +{ + return -1; +} + +static inline int cpuidle_coupled_register_device(struct cpuidle_device *dev) +{ + return 0; +} + +static inline void cpuidle_coupled_unregister_device(struct cpuidle_device *dev) +{ +} +#endif + #endif /* __DRIVER_CPUIDLE_H */ |