Commit 1856e0b2 authored by Alexandre Belloni's avatar Alexandre Belloni

rtc: pcf8563: don't alway enable the alarm

Allow setting the alarm and later enable it instead of enabling it
unconditionally.
Signed-off-by: default avatarAlexandre Belloni <alexandre.belloni@free-electrons.com>
parent a3350f9c
...@@ -387,7 +387,7 @@ static int pcf8563_rtc_set_alarm(struct device *dev, struct rtc_wkalrm *tm) ...@@ -387,7 +387,7 @@ static int pcf8563_rtc_set_alarm(struct device *dev, struct rtc_wkalrm *tm)
if (err) if (err)
return err; return err;
return pcf8563_set_alarm_mode(client, 1); return pcf8563_set_alarm_mode(client, !!tm->enabled);
} }
static int pcf8563_irq_enable(struct device *dev, unsigned int enabled) static int pcf8563_irq_enable(struct device *dev, unsigned int enabled)
......
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