* [PATCH] rtc: pl031: fix set_alarm by adding back call to alarm_irq_enable
@ 2020-07-14 12:45 Sudeep Holla
2020-07-14 15:04 ` Valentin Schneider
2020-07-16 9:28 ` Alexandre Belloni
0 siblings, 2 replies; 3+ messages in thread
From: Sudeep Holla @ 2020-07-14 12:45 UTC (permalink / raw)
To: linux-rtc
Cc: Sudeep Holla, linux-kernel, linux-arm-kernel, Linus Walleij,
Alexandre Belloni
Commit c8ff5841a90b ("rtc: pl031: switch to rtc_time64_to_tm/rtc_tm_to_time64")
seemed to have accidentally removed the call to pl031_alarm_irq_enable
from pl031_set_alarm while switching to 64-bit apis.
Let us add back the same to get the set alarm functionality back.
Fixes: c8ff5841a90b ("rtc: pl031: switch to rtc_time64_to_tm/rtc_tm_to_time64")
Cc: Linus Walleij <linus.walleij@linaro.org>
Cc: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
---
drivers/rtc/rtc-pl031.c | 1 +
1 file changed, 1 insertion(+)
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;
}
--
2.17.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] rtc: pl031: fix set_alarm by adding back call to alarm_irq_enable
2020-07-14 12:45 [PATCH] rtc: pl031: fix set_alarm by adding back call to alarm_irq_enable Sudeep Holla
@ 2020-07-14 15:04 ` Valentin Schneider
2020-07-16 9:28 ` Alexandre Belloni
1 sibling, 0 replies; 3+ messages in thread
From: Valentin Schneider @ 2020-07-14 15:04 UTC (permalink / raw)
To: Sudeep Holla
Cc: linux-rtc, linux-kernel, linux-arm-kernel, Linus Walleij,
Alexandre Belloni
On 14/07/20 13:45, Sudeep Holla wrote:
> Commit c8ff5841a90b ("rtc: pl031: switch to rtc_time64_to_tm/rtc_tm_to_time64")
> seemed to have accidentally removed the call to pl031_alarm_irq_enable
> from pl031_set_alarm while switching to 64-bit apis.
>
> Let us add back the same to get the set alarm functionality back.
>
> Fixes: c8ff5841a90b ("rtc: pl031: switch to rtc_time64_to_tm/rtc_tm_to_time64")
> Cc: Linus Walleij <linus.walleij@linaro.org>
> Cc: Alexandre Belloni <alexandre.belloni@bootlin.com>
> Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
Thanks for looking into this!
CONFIG_TEST_SUSPEND with test_suspend=mem now behaves correctly (i.e. comes
back out of suspend), and
$ rtcwake -d /dev/rtc0 -s 2 -m no
shows an increase in RTC interrupts (which remains at 0 before this patch).
Tested-by: Valentin Schneider <valentin.schneider@arm.com>
> ---
> drivers/rtc/rtc-pl031.c | 1 +
> 1 file changed, 1 insertion(+)
>
> 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;
> }
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] rtc: pl031: fix set_alarm by adding back call to alarm_irq_enable
2020-07-14 12:45 [PATCH] rtc: pl031: fix set_alarm by adding back call to alarm_irq_enable Sudeep Holla
2020-07-14 15:04 ` Valentin Schneider
@ 2020-07-16 9:28 ` Alexandre Belloni
1 sibling, 0 replies; 3+ messages in thread
From: Alexandre Belloni @ 2020-07-16 9:28 UTC (permalink / raw)
To: linux-rtc, Sudeep Holla
Cc: Alexandre Belloni, linux-arm-kernel, linux-kernel, Linus Walleij
On Tue, 14 Jul 2020 13:45:56 +0100, Sudeep Holla wrote:
> Commit c8ff5841a90b ("rtc: pl031: switch to rtc_time64_to_tm/rtc_tm_to_time64")
> seemed to have accidentally removed the call to pl031_alarm_irq_enable
> from pl031_set_alarm while switching to 64-bit apis.
>
> Let us add back the same to get the set alarm functionality back.
Applied, thanks!
[1/1] rtc: pl031: fix set_alarm by adding back call to alarm_irq_enable
commit: 4df2ef85f0efe44505f511ca5e4455585f53a2da
Best regards,
--
Alexandre Belloni <alexandre.belloni@bootlin.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-07-16 9:29 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-14 12:45 [PATCH] rtc: pl031: fix set_alarm by adding back call to alarm_irq_enable Sudeep Holla
2020-07-14 15:04 ` Valentin Schneider
2020-07-16 9:28 ` Alexandre Belloni
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).