aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/pm_wakeup.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/pm_wakeup.h')
-rw-r--r--include/linux/pm_wakeup.h10
1 files changed, 7 insertions, 3 deletions
diff --git a/include/linux/pm_wakeup.h b/include/linux/pm_wakeup.h
index 22d64c18056c..76aca48722ae 100644
--- a/include/linux/pm_wakeup.h
+++ b/include/linux/pm_wakeup.h
@@ -29,8 +29,11 @@
29 29
30#ifdef CONFIG_PM 30#ifdef CONFIG_PM
31 31
32/* changes to device_may_wakeup take effect on the next pm state change. 32/* Changes to device_may_wakeup take effect on the next pm state change.
33 * by default, devices should wakeup if they can. 33 *
34 * By default, most devices should leave wakeup disabled. The exceptions
35 * are devices that everyone expects to be wakeup sources: keyboards,
36 * power buttons, possibly network interfaces, etc.
34 */ 37 */
35static inline void device_init_wakeup(struct device *dev, bool val) 38static inline void device_init_wakeup(struct device *dev, bool val)
36{ 39{
@@ -59,7 +62,7 @@ static inline bool device_may_wakeup(struct device *dev)
59 62
60#else /* !CONFIG_PM */ 63#else /* !CONFIG_PM */
61 64
62/* For some reason the next two routines work even without CONFIG_PM */ 65/* For some reason the following routines work even without CONFIG_PM */
63static inline void device_init_wakeup(struct device *dev, bool val) 66static inline void device_init_wakeup(struct device *dev, bool val)
64{ 67{
65 dev->power.can_wakeup = val; 68 dev->power.can_wakeup = val;
@@ -67,6 +70,7 @@ static inline void device_init_wakeup(struct device *dev, bool val)
67 70
68static inline void device_set_wakeup_capable(struct device *dev, bool capable) 71static inline void device_set_wakeup_capable(struct device *dev, bool capable)
69{ 72{
73 dev->power.can_wakeup = capable;
70} 74}
71 75
72static inline bool device_can_wakeup(struct device *dev) 76static inline bool device_can_wakeup(struct device *dev)