diff options
| author | Doug Zobel <dzobel1@motorola.com> | 2014-09-24 08:53:44 -0500 |
|---|---|---|
| committer | Doug Zobel <dzobel1@motorola.com> | 2014-09-26 15:33:44 -0500 |
| commit | da60db0a6aeb77f2622a7cc49b4af2dddfac40ab (patch) | |
| tree | 483663a11d7167d286dcf8a78e2580b167e13ef9 | |
| parent | 5fe013f79b93a67e8aa070172bd1ab35c51c3ab4 (diff) | |
| download | olio-linux-3.10-da60db0a6aeb77f2622a7cc49b4af2dddfac40ab.tar.xz olio-linux-3.10-da60db0a6aeb77f2622a7cc49b4af2dddfac40ab.zip | |
IKXCLOCK-3996 alarm: Add alarm scheduling debug
Add alarm scheduling debugging in case issue with alarms being scheduled
in the past is seen again.
| -rw-r--r-- | drivers/rtc/rtc-sensorhub.c | 3 | ||||
| -rw-r--r-- | kernel/time/alarmtimer.c | 3 |
2 files changed, 6 insertions, 0 deletions
diff --git a/drivers/rtc/rtc-sensorhub.c b/drivers/rtc/rtc-sensorhub.c index f4e713d741f..16f95758f93 100644 --- a/drivers/rtc/rtc-sensorhub.c +++ b/drivers/rtc/rtc-sensorhub.c @@ -223,6 +223,9 @@ static int rtc_sensorhub_rtc_set_time(struct device *p_dev, "set time, but failed to set M4 clock!\n"); return -EIO; } + dev_dbg(p_dev, "Set RTC time to %d-%02d-%02d %02d:%02d:%02d UTC (%ld)\n", + p_tm->tm_year + 1900, p_tm->tm_mon + 1, p_tm->tm_mday, + p_tm->tm_hour, p_tm->tm_min, p_tm->tm_sec, sec); return 0; } diff --git a/kernel/time/alarmtimer.c b/kernel/time/alarmtimer.c index 07f7c6f9330..acd35596981 100644 --- a/kernel/time/alarmtimer.c +++ b/kernel/time/alarmtimer.c @@ -264,6 +264,9 @@ static int alarmtimer_suspend(struct device *dev) if (ret < 0) goto out; now = rtc_tm_to_ktime(tm); + dev_dbg(dev, "RTC is %lld next alarm will be in %lld seconds at %lld\n", + div64_u64(now.tv64, 1000000000), div64_u64(min.tv64, 1000000000), + div64_u64(ktime_to_ns(ktime_add(now, min)), 1000000000)); now = ktime_add(now, min); /* Set alarm, if in the past reject suspend briefly to handle */ |