diff mbox series

rtc: pl031: fix alarm support

Message ID 20200716053438.3498-1-m.szyprowski@samsung.com (mailing list archive)
State Mainlined
Commit 4df2ef85f0efe44505f511ca5e4455585f53a2da
Headers show
Series rtc: pl031: fix alarm support | expand

Commit Message

Marek Szyprowski July 16, 2020, 5:34 a.m. UTC
Commit 75a472845196 ("rtc: pl031: switch to rtc_time64_to_tm/rtc_tm_to_time64")
adjusted driver to the new API, but during the conversion a call to enable
alarm irq in set_alarm() was lost. Restore it, what fixes alarm support in
the PL031 RTC driver.

Fixes: 75a472845196 ("rtc: pl031: switch to rtc_time64_to_tm/rtc_tm_to_time64")
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
---
 drivers/rtc/rtc-pl031.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Sudeep Holla July 16, 2020, 9:06 a.m. UTC | #1
On Thu, Jul 16, 2020 at 6:37 AM Marek Szyprowski
<m.szyprowski@samsung.com> wrote:
>
> Commit 75a472845196 ("rtc: pl031: switch to rtc_time64_to_tm/rtc_tm_to_time64")
> adjusted driver to the new API, but during the conversion a call to enable
> alarm irq in set_alarm() was lost. Restore it, what fixes alarm support in
> the PL031 RTC driver.
>

I posted exact same fix couple of days back[1]

--
Regards,
Sudeep

[1] http://lore.kernel.org/r/20200714124556.20294-1-sudeep.holla@arm.com
diff mbox series

Patch

diff --git a/drivers/rtc/rtc-pl031.c b/drivers/rtc/rtc-pl031.c
index 40d7450a1ce4..c6b89273feba 100644
--- a/drivers/rtc/rtc-pl031.c
+++ b/drivers/rtc/rtc-pl031.c
@@ -275,6 +275,7 @@  static int pl031_set_alarm(struct device *dev, struct rtc_wkalrm *alarm)
 	struct pl031_local *ldata = dev_get_drvdata(dev);
 
 	writel(rtc_tm_to_time64(&alarm->time), ldata->base + RTC_MR);
+	pl031_alarm_irq_enable(dev, alarm->enabled);
 
 	return 0;
 }