[PATCH 06/12] rtc: da9063: clear the wake IRQ on unbind
Prasanth R
ragaprasanth at gmail.com
Tue Nov 24 23:20:20 PST 2026
From: Prasanth R <ragaprasanth at gmail.com>
The driver has no remove callback, so the wake IRQ set with
dev_pm_set_wake_irq() and the wakeup source enabled with
device_init_wakeup() are never released on unbind.
When the driver is bound again, dev_pm_set_wake_irq() finds the old wake
IRQ, warns "wake irq already initialized" and returns -EEXIST, so the
driver warns that it failed to set the wake IRQ.
Use the device-managed variants so both are released on unbind.
Compile-tested only.
I used an AI assistant (Claude) to find this and write the change.
Fixes: ed17a2bcbb75 ("rtc: da9063: Mark the alarm IRQ as a wake IRQ")
Signed-off-by: Prasanth R <prasanth.r at lineo.co.jp>
---
drivers/rtc/rtc-da9063.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/rtc/rtc-da9063.c b/drivers/rtc/rtc-da9063.c
index b56b9d9cb..2bb32156d 100644
--- a/drivers/rtc/rtc-da9063.c
+++ b/drivers/rtc/rtc-da9063.c
@@ -466,13 +466,13 @@ static int da9063_rtc_probe(struct platform_device *pdev)
"Failed to request ALARM IRQ %d: %d\n",
irq_alarm, ret);
- ret = dev_pm_set_wake_irq(&pdev->dev, irq_alarm);
+ ret = devm_pm_set_wake_irq(&pdev->dev, irq_alarm);
if (ret)
dev_warn(&pdev->dev,
"Failed to set IRQ %d as a wake IRQ: %d\n",
irq_alarm, ret);
- device_init_wakeup(&pdev->dev, true);
+ devm_device_init_wakeup(&pdev->dev);
} else if (irq_alarm != -ENXIO) {
return irq_alarm;
} else {
--
2.43.0
More information about the linux-arm-kernel
mailing list