Commit 05f45d7d authored by Werner Almesberger's avatar Werner Almesberger Committed by Linus Torvalds

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: default avatarWerner Almesberger <>
Reported-by: default avatarMichael 'Mickey' Lauer <>
Signed-off-by: Paul Fertser's avatarPaul Fertser <>
Cc: Paul Gortmaker <>
Cc: Balaji Rao <>
Cc: Alessandro Zummo <>
Signed-off-by: default avatarAndrew Morton <>
Signed-off-by: default avatarLinus Torvalds <>
parent 265f2a05
......@@ -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;
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment