aboutsummaryrefslogtreecommitdiff
path: root/kernel/time/timekeeping.c
diff options
context:
space:
mode:
authorGravatar Rafael J. Wysocki <rjw@sisk.pl> 2012-08-06 01:40:41 +0200
committerGravatar Rafael J. Wysocki <rjw@sisk.pl> 2012-09-04 01:36:01 +0200
commitadc78e6b9946a4b22e22403d961f3b03c469e5d3 (patch)
treee0837d6a5778c9bfa0a698f10a7cbedf9cf76cd0 /kernel/time/timekeeping.c
parentPM / Domains: Add power off/on function for system core suspend stage (diff)
downloadlinux-adc78e6b9946a4b22e22403d961f3b03c469e5d3.tar.gz
linux-adc78e6b9946a4b22e22403d961f3b03c469e5d3.tar.bz2
linux-adc78e6b9946a4b22e22403d961f3b03c469e5d3.zip
timekeeping: Add suspend and resume of clock event devices
Some clock event devices, for example such that belong to PM domains, need to be handled in a spcial way during the timekeeping suspend and resume (which takes place in the system core, or "syscore", stages of system power transitions) in analogy with clock sources. Introduce .suspend() and .resume() callbacks for clock event devices that will be executed by timekeeping_suspend/_resume(), respectively, next the the clock sources' .suspend() and .resume() callbacks. Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Diffstat (limited to 'kernel/time/timekeeping.c')
-rw-r--r--kernel/time/timekeeping.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/kernel/time/timekeeping.c b/kernel/time/timekeeping.c
index 34e5eac81424..312a675cb240 100644
--- a/kernel/time/timekeeping.c
+++ b/kernel/time/timekeeping.c
@@ -773,6 +773,7 @@ static void timekeeping_resume(void)
read_persistent_clock(&ts);
+ clockevents_resume();
clocksource_resume();
write_seqlock_irqsave(&tk->lock, flags);
@@ -832,6 +833,7 @@ static int timekeeping_suspend(void)
clockevents_notify(CLOCK_EVT_NOTIFY_SUSPEND, NULL);
clocksource_suspend();
+ clockevents_suspend();
return 0;
}