* Re: [PATCH 0/3] Input: clear the wake IRQ on unbind
[not found] <20261125072124.2997511-1-prasanth.r@lineo.co.jp>
@ 2026-11-26 8:21 ` Dmitry Torokhov
0 siblings, 0 replies; only message in thread
From: Dmitry Torokhov @ 2026-11-26 8:21 UTC (permalink / raw)
To: Prasanth R
Cc: linux-input, Hans de Goede, Chen-Yu Tsai, Jernej Skrabec,
Samuel Holland, Support Opensource, linux-arm-kernel, linux-sunxi,
Rafael J. Wysocki, Pavel Machek, Len Brown, linux-pm,
Greg Kroah-Hartman, Danilo Krummrich, Johan Hovold, driver-core
Hi Prasanth,
On Wed, Nov 25, 2026 at 04:21:21PM +0900, Prasanth R wrote:
> These drivers set a wake IRQ with dev_pm_set_wake_irq() and never clear
> it. After unbind and bind, dev_pm_set_wake_irq() warns "wake irq already
> initialized" and returns -EEXIST.
>
> Switch them to the device-managed helpers.
Adding PM and driver core maintainers to the thread.
I wonder why clearing the wake IRQ cannot be done automatically for all
drivers on unbind, for example in device_unbind_cleanup() alongside
pm_runtime_reinit() and dev_pm_set_driver_flags().
The only case I see where a wake IRQ is attached at device registration
time rather than by a bound driver (or bus probe()) is PCI OF WAKE# in
drivers/pci/of.c:pci_configure_wake_irq(). That could be distinguished
by checking dev->driver when attaching the wake IRQ, or via an explicit
flag, so device_unbind_cleanup() only clears driver-bound wake IRQs.
Handling this in the core would save us from having to hunt down and
convert individual drivers to devm_pm_set_wake_irq() across the tree,
and would also fix buses like SPI that set up wake IRQs in probe() but
do not clear them on remove.
Thanks.
--
Dmitry
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2026-11-26 8:21 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20261125072124.2997511-1-prasanth.r@lineo.co.jp>
2026-11-26 8:21 ` [PATCH 0/3] Input: clear the wake IRQ on unbind Dmitry Torokhov
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox