aboutsummaryrefslogtreecommitdiff
path: root/drivers/rtc
diff options
context:
space:
mode:
authorWerner Almesberger <werner@openmoko.org>2009-10-06 02:00:36 +0400
committerPaul Fertser <fercerpav@gmail.com>2009-10-07 19:06:57 +0400
commitf1763f03f915a694754c8b618ed29193c67b71e8 (patch)
tree0cb4fd7f9cfa7ccad7ec2bd3c959b0dffe3fcad4 /drivers/rtc
parent555fe3165dd4a817b50c5edaa3006d85a18f51e7 (diff)
rtc: pcf50633: consider alrm->enable in pcf50633_rtc_set_alarm
According to Documentation/rtc.txt, RTC_WKALM_SET sets the alarm time and enables/disables the alarm. We implement RTC_WKALM_SET through pcf50633_rtc_set_alarm. The enabling/disabling part was missing. Signed-off-by: Werner Almesberger <werner@openmoko.org> Reported-by: Michael 'Mickey' Lauer <mickey@openmoko.org> Signed-off-by: Paul Fertser <fercerpav@gmail.com>
Diffstat (limited to 'drivers/rtc')
-rw-r--r--drivers/rtc/rtc-pcf50633.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/rtc/rtc-pcf50633.c b/drivers/rtc/rtc-pcf50633.c
index 77b40ddd66e..33a10c47260 100644
--- a/drivers/rtc/rtc-pcf50633.c
+++ b/drivers/rtc/rtc-pcf50633.c
@@ -245,8 +245,9 @@ static int pcf50633_rtc_set_alarm(struct device *dev, struct rtc_wkalrm *alrm)
ret = pcf50633_write_block(rtc->pcf, PCF50633_REG_RTCSCA,
PCF50633_TI_EXTENT, &pcf_tm.time[0]);
- if (!alarm_masked)
+ if (!alarm_masked || alrm->enabled)
pcf50633_irq_unmask(rtc->pcf, PCF50633_IRQ_ALARM);
+ rtc->alarm_enabled = alrm->enabled;
return ret;
}