diff options
author | Rafael J. Wysocki <rjw@sisk.pl> | 2009-12-03 21:19:18 +0100 |
---|---|---|
committer | Rafael J. Wysocki <rjw@sisk.pl> | 2009-12-06 16:17:57 +0100 |
commit | 7a1a8eb58a2c6cd819d17332c5a2c369203635d5 (patch) | |
tree | 2424ca8b41f97a0d4110218ef75caa50270c194a /include/linux/pm_runtime.h | |
parent | 965c4ac0613b071d6f035334c5d9d942013df4f9 (diff) | |
download | linux-7a1a8eb58a2c6cd819d17332c5a2c369203635d5.tar.gz linux-7a1a8eb58a2c6cd819d17332c5a2c369203635d5.tar.bz2 linux-7a1a8eb58a2c6cd819d17332c5a2c369203635d5.zip |
PM: Add flag for devices capable of generating run-time wake-up events
Apparently, there are devices that can wake up the system from sleep
states and yet are incapable of generating wake-up events at run
time. Thus, introduce a flag indicating if given device is capable
of generating run-time wake-up events.
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Diffstat (limited to 'include/linux/pm_runtime.h')
-rw-r--r-- | include/linux/pm_runtime.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/include/linux/pm_runtime.h b/include/linux/pm_runtime.h index 44087044910f..370ce0a6fe4a 100644 --- a/include/linux/pm_runtime.h +++ b/include/linux/pm_runtime.h @@ -50,6 +50,16 @@ static inline void pm_runtime_put_noidle(struct device *dev) atomic_add_unless(&dev->power.usage_count, -1, 0); } +static inline bool device_run_wake(struct device *dev) +{ + return dev->power.run_wake; +} + +static inline void device_set_run_wake(struct device *dev, bool enable) +{ + dev->power.run_wake = enable; +} + #else /* !CONFIG_PM_RUNTIME */ static inline int pm_runtime_idle(struct device *dev) { return -ENOSYS; } @@ -73,6 +83,8 @@ static inline bool pm_children_suspended(struct device *dev) { return false; } static inline void pm_suspend_ignore_children(struct device *dev, bool en) {} static inline void pm_runtime_get_noresume(struct device *dev) {} static inline void pm_runtime_put_noidle(struct device *dev) {} +static inline bool device_run_wake(struct device *dev) { return false; } +static inline void device_set_run_wake(struct device *dev, bool enable) {} #endif /* !CONFIG_PM_RUNTIME */ |