drivers: rtc: add debug log into rtc module

According to the guideline from Qualcomm support, I add RTC log
in kernel so that we can trace the issue from unexpected RTC reset

Change-Id: Ia26f18ecebcf7627df167dd146582717c8e3414c
Signed-off-by: wangxf14 <wangxf14@motorola.com>
Reviewed-on: https://gerrit.mot.com/1824238
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Haijian Ma <mahj8@motorola.com>
Reviewed-by: Hujun Liao <liaohj@motorola.com>
Submit-Approved: Jira Key
This commit is contained in:
wangxf14 2020-12-10 15:02:35 +08:00 • committed by Xiaojun Ji
commit c6852b254e

View file

@ -63,6 +63,13 @@ struct pm8xxx_rtc {
spinlock_t ctrl_reg_lock;
};
/* MMI_STOPSHIP BSP: Debug unexpected RTC reset */
#ifdef dev_dbg
#undef dev_dbg
#define dev_dbg dev_err
#endif
/*
* Steps to write the RTC registers.
* 1. Disable alarm if enabled.
@ -358,6 +365,9 @@ static irqreturn_t pm8xxx_alarm_trigger(int irq, void *dev_id)
rtc_update_irq(rtc_dd->rtc, 1, RTC_IRQF | RTC_AF);
dev_dbg(rtc_dd->rtc_dev,
"motorola debug rtc : enter %s\n", __func__);
spin_lock_irqsave(&rtc_dd->ctrl_reg_lock, irq_flags);
/* Clear the alarm enable bit */