diff options
author | Andriy Skulysh <askulysh@gmail.com> | 2006-09-27 03:20:22 -0400 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2006-09-27 03:20:22 -0400 |
commit | 3aa770e7972723f479122cf66b529017d2175289 (patch) | |
tree | f70d870381cec8034693704e346c53b311db688f /arch/sh/kernel/time.c | |
parent | ef48e8e3498605351f91f195cc9af0ef981b0dde (diff) |
sh: APM/PM support.
This adds some simple PM stubs and the basic APM interfaces,
primarily for use by hp6xx, where the existing userland
expects it.
Signed-off-by: Andriy Skulysh <askulysh@gmail.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'arch/sh/kernel/time.c')
-rw-r--r-- | arch/sh/kernel/time.c | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/arch/sh/kernel/time.c b/arch/sh/kernel/time.c index a1589f85499d..c8db6ca4f9d1 100644 --- a/arch/sh/kernel/time.c +++ b/arch/sh/kernel/time.c | |||
@@ -143,8 +143,33 @@ void handle_timer_tick(struct pt_regs *regs) | |||
143 | } | 143 | } |
144 | } | 144 | } |
145 | 145 | ||
146 | #ifdef CONFIG_PM | ||
147 | int timer_suspend(struct sys_device *dev, pm_message_t state) | ||
148 | { | ||
149 | struct sys_timer *sys_timer = container_of(dev, struct sys_timer, dev); | ||
150 | |||
151 | sys_timer->ops->stop(); | ||
152 | |||
153 | return 0; | ||
154 | } | ||
155 | |||
156 | int timer_resume(struct sys_device *dev) | ||
157 | { | ||
158 | struct sys_timer *sys_timer = container_of(dev, struct sys_timer, dev); | ||
159 | |||
160 | sys_timer->ops->start(); | ||
161 | |||
162 | return 0; | ||
163 | } | ||
164 | #else | ||
165 | #define timer_suspend NULL | ||
166 | #define timer_resume NULL | ||
167 | #endif | ||
168 | |||
146 | static struct sysdev_class timer_sysclass = { | 169 | static struct sysdev_class timer_sysclass = { |
147 | set_kset_name("timer"), | 170 | set_kset_name("timer"), |
171 | .suspend = timer_suspend, | ||
172 | .resume = timer_resume, | ||
148 | }; | 173 | }; |
149 | 174 | ||
150 | static int __init timer_init_sysfs(void) | 175 | static int __init timer_init_sysfs(void) |