Skip to contentSkip to conversation

rtc: pl031: fix set_alarm by adding back call to alarm_irq_enable

PATCH Applied Sudeep Holla 3 participants 3 messages Jul 14, 2020 – Jul 16, 2020

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 rtc: pl031: fix set_alarm by adding back call to alarm_irq_enable

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 <[email protected]>
Cc Alexandre Belloni <[email protected]>
---
 drivers/rtc/rtc-pl031.c | 1 +
 1 file changed, 1 insertion(+)
drivers/rtc/rtc-pl031.c +1 -0
index 40d7450a1ce4..c6b89273feba 100644
@@ -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;
 }
Signature · 1 line
2.17.1
Tested-by on v1 1/1
#1 lore raw
Quoted 10 lines · Sudeep Holla

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 <[email protected]>
Cc Alexandre Belloni <[email protected]>

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).

Quoted 16 lines
---
 drivers/rtc/rtc-pl031.c | 1 +
 1 file changed, 1 insertion(+)
drivers/rtc/rtc-pl031.c +1 -0
index 40d7450a1ce4..c6b89273feba 100644
@@ -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;
 }
maintainer Applied
#2 lore raw
In reply to Sudeep Holla
Quoted 5 lines · Sudeep Holla

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,

Signature · 1 line
Alexandre Belloni <[email protected]>