* [PATCH] rtc: rzn1: clear interrupts on remove
@ 2025-03-12 7:52 Wolfram Sang
2025-03-12 9:53 ` Wolfram Sang
0 siblings, 1 reply; 2+ messages in thread
From: Wolfram Sang @ 2025-03-12 7:52 UTC (permalink / raw)
To: linux-renesas-soc
Cc: Wolfram Sang, Miquel Raynal, Alexandre Belloni, linux-rtc
It is good practice to clear running interrupts before removing the
driver. This is not really a bugfix because on current systems RuntimePM
will disable the module clock, so interrupts won't be initiated. The
dependency on that behaviour is subtle, though. Better be self-contained
and clean up when removing.
Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
---
drivers/rtc/rtc-rzn1.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/rtc/rtc-rzn1.c b/drivers/rtc/rtc-rzn1.c
index eeb9612a666f..d15aa8fad5af 100644
--- a/drivers/rtc/rtc-rzn1.c
+++ b/drivers/rtc/rtc-rzn1.c
@@ -444,6 +444,9 @@ static int rzn1_rtc_probe(struct platform_device *pdev)
static void rzn1_rtc_remove(struct platform_device *pdev)
{
+ /* Disable all interrupts */
+ writel(0, rtc->base + RZN1_RTC_CTL1);
+
pm_runtime_put(&pdev->dev);
}
--
2.47.2
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] rtc: rzn1: clear interrupts on remove
2025-03-12 7:52 [PATCH] rtc: rzn1: clear interrupts on remove Wolfram Sang
@ 2025-03-12 9:53 ` Wolfram Sang
0 siblings, 0 replies; 2+ messages in thread
From: Wolfram Sang @ 2025-03-12 9:53 UTC (permalink / raw)
To: linux-renesas-soc; +Cc: Miquel Raynal, Alexandre Belloni, linux-rtc
[-- Attachment #1: Type: text/plain, Size: 174 bytes --]
> + /* Disable all interrupts */
> + writel(0, rtc->base + RZN1_RTC_CTL1);
Embarassing. It doesn't even compile. I checked the wrong branch :(
Really sorry for the noise!
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2025-03-12 9:53 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-03-12 7:52 [PATCH] rtc: rzn1: clear interrupts on remove Wolfram Sang
2025-03-12 9:53 ` Wolfram Sang
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).