From: sashiko-bot@kernel.org
To: "Prasanth R" <ragaprasanth@gmail.com>
Cc: linux-rtc@vger.kernel.org,
"Alexandre Belloni" <alexandre.belloni@bootlin.com>
Subject: Re: [PATCH] PM: wakeirq: Clear driver wake IRQs on unbind
Date: Sat, 28 Nov 2026 23:42:04 +0000 [thread overview]
Message-ID: <sashiko-outbox-239151@kernel.org> (raw)
In-Reply-To: <20261128232509.3175087-1-ragaprasanth@gmail.com>
> A wake IRQ set up by a driver with dev_pm_set_wake_irq() or
> dev_pm_set_dedicated_wake_irq() stays attached to the device after the
> driver is unbound, unless the driver or its bus clears it. Many drivers
> don't, and unlike the I2C core, the platform and SPI buses don't either.
> When the driver is bound again, dev_pm_set_wake_irq() warns "wake irq
> already initialized" and returns -EEXIST. The same happens when probe
> fails after setting the wake IRQ, for example with -EPROBE_DEFER.
>
> Mark a wake IRQ that is set while a driver is bound, and clear it in
> device_unbind_cleanup(), which runs on unbind and after a failed probe.
> Wake IRQs set up without a driver, like the PCI WAKE# IRQ set when the
> device is registered, stay in place.
>
> Drivers and buses that already clear the wake IRQ, directly or with
> devm_pm_set_wake_irq(), are not affected: it is gone by then.
>
> Tested on an i.MX6Q SABRE-SD: the snvs RTC and power key drivers can be
> unbound and bound again through sysfs without changes to the drivers.
>
> Suggested-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
> Link: https://lore.kernel.org/r/20261125072026.2997493-1-prasanth.r@lineo.co.jp
> Signed-off-by: Prasanth R <prasanth.r@lineo.co.jp>
Sashiko has reviewed this patch and found no issues.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261128232509.3175087-1-ragaprasanth@gmail.com?part=1
prev parent reply other threads:[~2026-11-28 23:42 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <8497d7101dc7524be91edbaa5a9face5@gmail.com>
2026-11-28 23:25 ` [PATCH] PM: wakeirq: Clear driver wake IRQs on unbind Prasanth R
2026-11-28 23:42 ` sashiko-bot [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=sashiko-outbox-239151@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=alexandre.belloni@bootlin.com \
--cc=linux-rtc@vger.kernel.org \
--cc=ragaprasanth@gmail.com \
--cc=sashiko-reviews@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox