aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/suspend.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/suspend.h')
-rw-r--r--include/linux/suspend.h22
1 files changed, 11 insertions, 11 deletions
diff --git a/include/linux/suspend.h b/include/linux/suspend.h
index c230680d5252..dce47825dbb8 100644
--- a/include/linux/suspend.h
+++ b/include/linux/suspend.h
@@ -27,16 +27,16 @@ typedef int __bitwise suspend_state_t;
27#define PM_SUSPEND_MAX ((__force suspend_state_t) 4) 27#define PM_SUSPEND_MAX ((__force suspend_state_t) 4)
28 28
29/** 29/**
30 * struct pm_ops - Callbacks for managing platform dependent system sleep 30 * struct platform_suspend_ops - Callbacks for managing platform dependent
31 * states. 31 * system sleep states.
32 * 32 *
33 * @valid: Callback to determine if given system sleep state is supported by 33 * @valid: Callback to determine if given system sleep state is supported by
34 * the platform. 34 * the platform.
35 * Valid (ie. supported) states are advertised in /sys/power/state. Note 35 * Valid (ie. supported) states are advertised in /sys/power/state. Note
36 * that it still may be impossible to enter given system sleep state if the 36 * that it still may be impossible to enter given system sleep state if the
37 * conditions aren't right. 37 * conditions aren't right.
38 * There is the %pm_valid_only_mem function available that can be assigned 38 * There is the %suspend_valid_only_mem function available that can be
39 * to this if the platform only supports mem sleep. 39 * assigned to this if the platform only supports mem sleep.
40 * 40 *
41 * @set_target: Tell the platform which system sleep state is going to be 41 * @set_target: Tell the platform which system sleep state is going to be
42 * entered. 42 * entered.
@@ -73,7 +73,7 @@ typedef int __bitwise suspend_state_t;
73 * that implement @prepare(). If implemented, it is always called after 73 * that implement @prepare(). If implemented, it is always called after
74 * @enter() (even if @enter() fails). 74 * @enter() (even if @enter() fails).
75 */ 75 */
76struct pm_ops { 76struct platform_suspend_ops {
77 int (*valid)(suspend_state_t state); 77 int (*valid)(suspend_state_t state);
78 int (*set_target)(suspend_state_t state); 78 int (*set_target)(suspend_state_t state);
79 int (*prepare)(suspend_state_t state); 79 int (*prepare)(suspend_state_t state);
@@ -82,14 +82,14 @@ struct pm_ops {
82}; 82};
83 83
84#ifdef CONFIG_SUSPEND 84#ifdef CONFIG_SUSPEND
85extern struct pm_ops *pm_ops; 85extern struct platform_suspend_ops *suspend_ops;
86 86
87/** 87/**
88 * pm_set_ops - set platform dependent power management ops 88 * suspend_set_ops - set platform dependent suspend operations
89 * @pm_ops: The new power management operations to set. 89 * @ops: The new suspend operations to set.
90 */ 90 */
91extern void pm_set_ops(struct pm_ops *pm_ops); 91extern void suspend_set_ops(struct platform_suspend_ops *ops);
92extern int pm_valid_only_mem(suspend_state_t state); 92extern int suspend_valid_only_mem(suspend_state_t state);
93 93
94/** 94/**
95 * arch_suspend_disable_irqs - disable IRQs for suspend 95 * arch_suspend_disable_irqs - disable IRQs for suspend
@@ -113,7 +113,7 @@ extern int pm_suspend(suspend_state_t state);
113#else /* !CONFIG_SUSPEND */ 113#else /* !CONFIG_SUSPEND */
114#define suspend_valid_only_mem NULL 114#define suspend_valid_only_mem NULL
115 115
116static inline void pm_set_ops(struct pm_ops *pm_ops) {} 116static inline void suspend_set_ops(struct platform_suspend_ops *ops) {}
117static inline int pm_suspend(suspend_state_t state) { return -ENOSYS; } 117static inline int pm_suspend(suspend_state_t state) { return -ENOSYS; }
118#endif /* !CONFIG_SUSPEND */ 118#endif /* !CONFIG_SUSPEND */
119 119