summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorPatrick Mochel <mochel@osdl.org>2003-08-18 01:31:59 -0700
committerPatrick Mochel <mochel@osdl.org>2003-08-18 01:31:59 -0700
commit47d696a99c502d7f75d3cf77ec1feb21ffc0ac9f (patch)
treee770aa01395fc11f308f1adf651e579aabb5118a /include/linux
parentadc58de4ba16591e7a520ee3c634edc03c4cd130 (diff)
[power] Improve suspend functions.
- Implement pm_suspend(), which is callable from anywhere in the kernel, and takes one of PM_SUSPEND_STANDBY PM_SUSPEND_MEM PM_SUSPEND_DISK and enters the appropriate state. - Change sysfs file to look for "standby" "mem" "disk" for what state to enter (rather than 'suspend' and 'hibernate' for the latter two). - Add pm_sem to block multiple suspend sequences happening at once. - Allocate a console and stop processes from common code before entering state. - Add pm_power_down() callback for platform drivers to implement. Will be called to actually enter the low-power state.
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/pm.h22
1 files changed, 22 insertions, 0 deletions
diff --git a/include/linux/pm.h b/include/linux/pm.h
index e4c795f71cea..a5e4d115d172 100644
--- a/include/linux/pm.h
+++ b/include/linux/pm.h
@@ -186,9 +186,31 @@ static inline void pm_dev_idle(struct pm_dev *dev) {}
#endif /* CONFIG_PM */
+
+/*
+ * Callbacks for platform drivers to implement.
+ */
extern void (*pm_idle)(void);
extern void (*pm_power_off)(void);
+enum {
+ PM_SUSPEND_ON,
+ PM_SUSPEND_STANDBY,
+ PM_SUSPEND_MEM,
+ PM_SUSPEND_DISK,
+ PM_SUSPEND_MAX,
+};
+
+extern int (*pm_power_down)(u32 state);
+
+
+extern int pm_suspend(u32 state);
+
+
+/*
+ * Device power management
+ */
+
struct device;
struct dev_pm_info {