diff options
author | Magnus Damm <damm@opensource.se> | 2009-10-29 13:51:48 +0300 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2009-10-30 05:54:59 +0300 |
commit | 49f42644fd01bc7bd9b6b0a080fee1a89dc66665 (patch) | |
tree | 570a5cc04f260ecdb81eb4af5ab3000c8518aa7d /arch/sh/include | |
parent | eb3118f652ea7751ecf6a7e467bb637895e3be3b (diff) | |
download | linux-49f42644fd01bc7bd9b6b0a080fee1a89dc66665.tar.xz |
sh: Add notifiers chains for cpu/board code
This patch adds atomic notifier chains for pre/post
sleep events. Useful for cpu code and boards that
need to save and restore register state before and
after entering a sleep mode.
Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'arch/sh/include')
-rw-r--r-- | arch/sh/include/asm/suspend.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/arch/sh/include/asm/suspend.h b/arch/sh/include/asm/suspend.h index 5c8ea28ff7a4..d1cc5221645d 100644 --- a/arch/sh/include/asm/suspend.h +++ b/arch/sh/include/asm/suspend.h @@ -2,6 +2,7 @@ #define _ASM_SH_SUSPEND_H #ifndef __ASSEMBLY__ +#include <linux/notifier.h> static inline int arch_prepare_suspend(void) { return 0; } #include <asm/ptrace.h> @@ -19,6 +20,16 @@ void sh_mobile_setup_cpuidle(void); static inline void sh_mobile_setup_cpuidle(void) {} #endif +/* notifier chains for pre/post sleep hooks */ +extern struct atomic_notifier_head sh_mobile_pre_sleep_notifier_list; +extern struct atomic_notifier_head sh_mobile_post_sleep_notifier_list; + +/* priority levels for notifiers */ +#define SH_MOBILE_SLEEP_BOARD 0 +#define SH_MOBILE_SLEEP_CPU 1 +#define SH_MOBILE_PRE(x) (x) +#define SH_MOBILE_POST(x) (-(x)) + #endif /* flags passed to assembly suspend code */ |