[PATCH 3/3] Input: da9063 - clear the wake IRQ on unbind

Prasanth R ragaprasanth at gmail.com
Tue Nov 24 23:21:24 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 and does not enable
wakeup.

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: d7781232b5b2 ("Input: da9063 - add wakeup support")
Signed-off-by: Prasanth R <prasanth.r at lineo.co.jp>
---
 drivers/input/misc/da9063_onkey.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/input/misc/da9063_onkey.c b/drivers/input/misc/da9063_onkey.c
index 98297ca1d..304fd674d 100644
--- a/drivers/input/misc/da9063_onkey.c
+++ b/drivers/input/misc/da9063_onkey.c
@@ -229,13 +229,13 @@ static int da9063_onkey_probe(struct platform_device *pdev)
 		return dev_err_probe(&pdev->dev, error,
 				     "Failed to allocate onkey IRQ\n");
 
-	error = dev_pm_set_wake_irq(&pdev->dev, irq);
+	error = devm_pm_set_wake_irq(&pdev->dev, irq);
 	if (error)
 		dev_warn(&pdev->dev,
 			 "Failed to set IRQ %d as a wake IRQ: %d\n",
 			 irq, error);
 	else
-		device_init_wakeup(&pdev->dev, true);
+		devm_device_init_wakeup(&pdev->dev);
 
 	error = input_register_device(onkey->input);
 	if (error)
-- 
2.43.0




More information about the linux-arm-kernel mailing list