diff options
author | Daniel Fu <danifu@nvidia.com> | 2012-09-05 11:45:04 +0800 |
---|---|---|
committer | Dan Willemsen <dwillemsen@nvidia.com> | 2013-09-14 12:33:54 -0700 |
commit | e1af1155398ce2381a27c03e430637827a796e2e (patch) | |
tree | 89a9fa35714ddeee88a428a7f3924d740ec8355e /drivers/rtc | |
parent | c1e832164236be8200ab0b4e41b3876bc7e5b047 (diff) |
rtc: max77663: fix alarm reading bug
When reading alarm of RTC-max77663, it didn't set alrm->enabled correctly,
if irq is masked, means disable alarm, alrm->enabled should be set to 0,
else it should be 1.
Change-Id: Id0b1ffd9a816643712f33624d7d52cbe7b66b3c3
Signed-off-by: Daniel Fu <danifu@nvidia.com>
Reviewed-on: http://git-master/r/129593
(cherry picked from commit e81b06d36a924dcdf8bb0456e7a50d1634d0365f)
Signed-off-by: Kerwin Wan <kerwinw@nvidia.com>
Change-Id: I21eb95bd6c051963db22e9b4494c6b59c79ae17c
Reviewed-on: http://git-master/r/131124
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
Rebase-Id: R38146862894845a5f02698d6865d97ddd82b2db1
Diffstat (limited to 'drivers/rtc')
-rw-r--r-- | drivers/rtc/rtc-max77663.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/rtc/rtc-max77663.c b/drivers/rtc/rtc-max77663.c index bfb5a8166a2a..0f654d84dba0 100644 --- a/drivers/rtc/rtc-max77663.c +++ b/drivers/rtc/rtc-max77663.c @@ -431,9 +431,9 @@ static int max77663_rtc_read_alarm(struct device *dev, struct rtc_wkalrm *alrm) alrm->time.tm_wday); if (rtc->irq_mask & RTC_IRQ_ALARM1_MASK) - alrm->enabled = 1; - else alrm->enabled = 0; + else + alrm->enabled = 1; return 0; } |