summaryrefslogtreecommitdiffstats
path: root/kernel/power/power.h
diff options
context:
space:
mode:
authorRafael J. Wysocki <rjw@sisk.pl>2009-06-10 01:27:12 +0200
committerRafael J. Wysocki <rjw@sisk.pl>2009-06-12 21:32:33 +0200
commita9d7052363a6e06bb623ed1876c56c7ca5b2c6d8 (patch)
treec4ec7fb30dc4510596ffc9ddffe308ef34837af2 /kernel/power/power.h
parent783ea7d4eeefe895f2731fe73ac951e94418927b (diff)
downloadop-kernel-dev-a9d7052363a6e06bb623ed1876c56c7ca5b2c6d8.zip
op-kernel-dev-a9d7052363a6e06bb623ed1876c56c7ca5b2c6d8.tar.gz
PM: Separate suspend to RAM functionality from core
Move the suspend to RAM and standby code from kernel/power/main.c to two separate files, kernel/power/suspend.c containing the basic functions and kernel/power/suspend_test.c containing the automatic suspend test facility based on the RTC clock alarm. There are no changes in functionality related to these modifications. Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl> Acked-by: Pavel Machek <pavel@ucw.cz>
Diffstat (limited to 'kernel/power/power.h')
-rw-r--r--kernel/power/power.h17
1 files changed, 16 insertions, 1 deletions
diff --git a/kernel/power/power.h b/kernel/power/power.h
index ec4dbdf..2bd98d9 100644
--- a/kernel/power/power.h
+++ b/kernel/power/power.h
@@ -160,15 +160,30 @@ extern void swsusp_show_speed(struct timeval *, struct timeval *,
unsigned int, char *);
#ifdef CONFIG_SUSPEND
-/* kernel/power/main.c */
+/* kernel/power/suspend.c */
+extern const char *const pm_states[];
+
+extern bool valid_state(suspend_state_t state);
extern int suspend_devices_and_enter(suspend_state_t state);
+extern int enter_state(suspend_state_t state);
#else /* !CONFIG_SUSPEND */
static inline int suspend_devices_and_enter(suspend_state_t state)
{
return -ENOSYS;
}
+static inline int enter_state(suspend_state_t state) { return -ENOSYS; }
+static inline bool valid_state(suspend_state_t state) { return false; }
#endif /* !CONFIG_SUSPEND */
+#ifdef CONFIG_PM_TEST_SUSPEND
+/* kernel/power/suspend_test.c */
+extern void suspend_test_start(void);
+extern void suspend_test_finish(const char *label);
+#else /* !CONFIG_PM_TEST_SUSPEND */
+static inline void suspend_test_start(void) {}
+static inline void suspend_test_finish(const char *label) {}
+#endif /* !CONFIG_PM_TEST_SUSPEND */
+
#ifdef CONFIG_PM_SLEEP
/* kernel/power/main.c */
extern int pm_notifier_call_chain(unsigned long val);
OpenPOWER on IntegriCloud