diff options
author | Laxman Dewangan <ldewangan@nvidia.com> | 2013-04-22 15:51:11 +0530 |
---|---|---|
committer | Dan Willemsen <dwillemsen@nvidia.com> | 2013-09-14 13:09:15 -0700 |
commit | 5fceb33bdca9ee7d86a57bc6cc1934d892c5d859 (patch) | |
tree | 348c646644ec09398ff63ac0688745ddb717f6f4 /drivers/rtc | |
parent | 3ac3c1417098058dc1029453777ad93dff9f9c3d (diff) |
rtc: max77660: add print when setting/reading time and alarm
To make debug easy, adding print when setting/reading current time and
alarm time.
bug 1275444
Change-Id: I39373ff1daad65315c434beab87b911ab9ddee96
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: http://git-master/r/221546
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>
Tested-by: Bitan Biswas <bbiswas@nvidia.com>
GVS: Gerrit_Virtual_Submit
Diffstat (limited to 'drivers/rtc')
-rw-r--r-- | drivers/rtc/rtc-max77660.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/drivers/rtc/rtc-max77660.c b/drivers/rtc/rtc-max77660.c index a32ba803f0b9..2d965d7f122d 100644 --- a/drivers/rtc/rtc-max77660.c +++ b/drivers/rtc/rtc-max77660.c @@ -99,6 +99,10 @@ static int max77660_rtc_read_time(struct device *dev, struct rtc_time *tm) max77660_register_to_time(tm, buf); + dev_info(dev, "%s() %d %d %d %d %d %d\n", + __func__, tm->tm_year, tm->tm_mon, tm->tm_mday, + tm->tm_hour, tm->tm_min, tm->tm_sec); + out: mutex_unlock(&rtc->rtc_reg_lock); return 0; @@ -110,6 +114,10 @@ static int max77660_rtc_set_time(struct device *dev, struct rtc_time *tm) u8 buf[RTC_MAX_BUF]; int ret; + dev_info(dev, "%s() %d %d %d %d %d %d\n", + __func__, tm->tm_year, tm->tm_mon, tm->tm_mday, + tm->tm_hour, tm->tm_min, tm->tm_sec); + max77660_time_to_register(tm, buf); mutex_lock(&rtc->rtc_reg_lock); @@ -148,6 +156,8 @@ static int max77660_rtc_alarm_irq_enable(struct device *dev, return -ESHUTDOWN; } + dev_info(dev, "%s(): enabled %u\n", __func__, enabled); + if (enabled) ret = max77660_reg_clr_bits(rtc->parent, MAX77660_RTC_SLAVE, MAX77660_RTC_IRQ_MASK, MAX77660_RTC_IRQ_ALARM1_MASK); @@ -180,6 +190,9 @@ static int max77660_rtc_read_alarm(struct device *dev, struct rtc_wkalrm *alrm) return ret; } max77660_register_to_time(&alrm->time, buf); + dev_info(dev, "%s() %d %d %d %d %d %d\n", __func__, + alrm->time.tm_year, alrm->time.tm_mon, alrm->time.tm_mday, + alrm->time.tm_hour, alrm->time.tm_min, alrm->time.tm_sec); return 0; } @@ -202,6 +215,10 @@ static int max77660_rtc_set_alarm(struct device *dev, struct rtc_wkalrm *alrm) dev_err(rtc->dev, "RTC_AE1 write failed: %d\n", ret); return ret; } + + dev_info(dev, "%s() %d %d %d %d %d %d\n", __func__, + alrm->time.tm_year, alrm->time.tm_mon, alrm->time.tm_mday, + alrm->time.tm_hour, alrm->time.tm_min, alrm->time.tm_sec); max77660_time_to_register(&alrm->time, buf); buf[RTC_WEEKDAY] = 0; |