diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2011-07-22 19:52:39 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-07-22 19:52:39 -0400 |
commit | 52de84f3f3f407013a7f7872601e7a43a505abd3 (patch) | |
tree | cfd7ac2fd9a928d4855eb90be06d25947f90f1ef /drivers/rtc/rtc-vt8500.c | |
parent | 112ec469663e09ffc815761254b52f3ca787ce83 (diff) | |
parent | ef68c8f87ed13f65df867dddf36c0e185b27b942 (diff) |
Merge branch 'timers-rtc-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
* 'timers-rtc-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
x86: Serialize EFI time accesses on rtc_lock
x86: Serialize SMP bootup CMOS accesses on rtc_lock
rtc: stmp3xxx: Remove UIE handlers
rtc: stmp3xxx: Get rid of mach-specific accessors
rtc: stmp3xxx: Initialize drvdata before registering device
rtc: stmp3xxx: Port stmp-functions to mxs-equivalents
rtc: stmp3xxx: Restore register definitions
rtc: vt8500: Use define instead of hardcoded value for status bit
Diffstat (limited to 'drivers/rtc/rtc-vt8500.c')
-rw-r--r-- | drivers/rtc/rtc-vt8500.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/rtc/rtc-vt8500.c b/drivers/rtc/rtc-vt8500.c index efd6066b5cd..f93f412423c 100644 --- a/drivers/rtc/rtc-vt8500.c +++ b/drivers/rtc/rtc-vt8500.c | |||
@@ -74,6 +74,8 @@ | |||
74 | #define VT8500_RTC_CR_SM_SEC (1 << 3) /* 0: 1Hz/60, 1: 1Hz */ | 74 | #define VT8500_RTC_CR_SM_SEC (1 << 3) /* 0: 1Hz/60, 1: 1Hz */ |
75 | #define VT8500_RTC_CR_CALIB (1 << 4) /* Enable calibration */ | 75 | #define VT8500_RTC_CR_CALIB (1 << 4) /* Enable calibration */ |
76 | 76 | ||
77 | #define VT8500_RTC_IS_ALARM (1 << 0) /* Alarm interrupt status */ | ||
78 | |||
77 | struct vt8500_rtc { | 79 | struct vt8500_rtc { |
78 | void __iomem *regbase; | 80 | void __iomem *regbase; |
79 | struct resource *res; | 81 | struct resource *res; |
@@ -96,7 +98,7 @@ static irqreturn_t vt8500_rtc_irq(int irq, void *dev_id) | |||
96 | 98 | ||
97 | spin_unlock(&vt8500_rtc->lock); | 99 | spin_unlock(&vt8500_rtc->lock); |
98 | 100 | ||
99 | if (isr & 1) | 101 | if (isr & VT8500_RTC_IS_ALARM) |
100 | events |= RTC_AF | RTC_IRQF; | 102 | events |= RTC_AF | RTC_IRQF; |
101 | 103 | ||
102 | rtc_update_irq(vt8500_rtc->rtc, 1, events); | 104 | rtc_update_irq(vt8500_rtc->rtc, 1, events); |
@@ -161,8 +163,8 @@ static int vt8500_rtc_read_alarm(struct device *dev, struct rtc_wkalrm *alrm) | |||
161 | alrm->time.tm_sec = bcd2bin((alarm & TIME_SEC_MASK)); | 163 | alrm->time.tm_sec = bcd2bin((alarm & TIME_SEC_MASK)); |
162 | 164 | ||
163 | alrm->enabled = (alarm & ALARM_ENABLE_MASK) ? 1 : 0; | 165 | alrm->enabled = (alarm & ALARM_ENABLE_MASK) ? 1 : 0; |
166 | alrm->pending = (isr & VT8500_RTC_IS_ALARM) ? 1 : 0; | ||
164 | 167 | ||
165 | alrm->pending = (isr & 1) ? 1 : 0; | ||
166 | return rtc_valid_tm(&alrm->time); | 168 | return rtc_valid_tm(&alrm->time); |
167 | } | 169 | } |
168 | 170 | ||