diff options
author | Daniel Fu <danifu@nvidia.com> | 2012-08-23 19:40:08 +0800 |
---|---|---|
committer | Mrutyunjay Sawant <msawant@nvidia.com> | 2012-09-05 03:46:39 -0700 |
commit | 1a61c310b66245a73e021d786eea45c31cd9f6e9 (patch) | |
tree | 783d872104e5e958773aaefa29bc8aa5c51cdf29 /drivers | |
parent | 5c13235fdd38404b3b785aa5c2d7e6f51e4bfb53 (diff) |
rtc: max77663: Set Alarm wday to its reset value
The wday is configured only when disabled alarm.
When enable alarm, set it to its default reset value 0x01,
and not enable it, to prevent an error happened when re-read the
alarm value into the virtualized generic layer at boot up in
reading alarm setting of RTC.
Bug 1034871
Change-Id: I8bfa997653edaaa286cf768c1827b5ab986f52cc
Signed-off-by: Daniel Fu <danifu@nvidia.com>
Reviewed-on: http://git-master/r/129398
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
Reviewed-by: Jinyoung Park <jinyoungp@nvidia.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/rtc/rtc-max77663.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/rtc/rtc-max77663.c b/drivers/rtc/rtc-max77663.c index 13d8062e1def..a84dcc73f0ec 100644 --- a/drivers/rtc/rtc-max77663.c +++ b/drivers/rtc/rtc-max77663.c @@ -227,9 +227,10 @@ static inline int max77663_rtc_tm_to_reg(struct max77663_rtc *rtc, u8 *buf, /* The wday is configured only when disabled alarm. */ if (!alarm) buf[RTC_WEEKDAY] = (1 << tm->tm_wday); - else - buf[RTC_WEEKDAY] = 0; - + else { + /* Configure its default reset value 0x01, and not enable it. */ + buf[RTC_WEEKDAY] = 0x01; + } return 0; } |