summaryrefslogtreecommitdiff
path: root/drivers/rtc
diff options
context:
space:
mode:
authorLinux Build Service Account <lnxbuild@localhost>2014-03-27 05:22:36 -0700
committerGerrit - the friendly Code Review server <code-review@localhost>2014-03-27 05:22:20 -0700
commit22b9645bc5dc57875de42d2a34539e24e97d7559 (patch)
tree3263867a43a7aaefc5773560f974b278ffb089b4 /drivers/rtc
parent78fa1c7b674e4e5a8ebc6a8f3845c508c75ff532 (diff)
parent939eed97199ff06646369f4523e695453c66b7e4 (diff)
Merge "rtc: qpnp-rtc: Set alarm control register properly"
Diffstat (limited to 'drivers/rtc')
-rw-r--r--drivers/rtc/qpnp-rtc.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/drivers/rtc/qpnp-rtc.c b/drivers/rtc/qpnp-rtc.c
index 4d73cf1bedcb..921a33a0110f 100644
--- a/drivers/rtc/qpnp-rtc.c
+++ b/drivers/rtc/qpnp-rtc.c
@@ -563,8 +563,15 @@ static int qpnp_rtc_probe(struct spmi_device *spmi)
goto fail_rtc_enable;
}
+ rc = qpnp_read_wrapper(rtc_dd, &rtc_dd->alarm_ctrl_reg1,
+ rtc_dd->alarm_base + REG_OFFSET_ALARM_CTRL1, 1);
+ if (rc) {
+ dev_err(&spmi->dev,
+ "Read from Alarm control reg failed\n");
+ goto fail_rtc_enable;
+ }
/* Enable abort enable feature */
- rtc_dd->alarm_ctrl_reg1 = BIT_RTC_ABORT_ENABLE;
+ rtc_dd->alarm_ctrl_reg1 |= BIT_RTC_ABORT_ENABLE;
rc = qpnp_write_wrapper(rtc_dd, &rtc_dd->alarm_ctrl_reg1,
rtc_dd->alarm_base + REG_OFFSET_ALARM_CTRL1, 1);
if (rc) {