Re: [PATCH v2] thermal: rcar_gen3: release the IRQ handlers before the zones are freed
From: Yaohan Li
Date: Mon Nov 23 2026 - 21:22:43 EST
Hi Niklas,
Yes, I agree. I have reworked the probe to look up the IRQs first,
initialize the sensors with IRQEN cleared, and request the handlers after
all the thermal zones have been registered. A devres action disables the
interrupt sources before the handlers are freed, so ->remove() is no
longer needed.
Since the thermal core copies the zone operations during registration,
set_trips() still has to be selected beforehand.
The current version retains the no-IRQ fallback for -ENXIO and propagates
-EPROBE_DEFER and other lookup errors. However, if IRQ lookup succeeds
but requesting a handler fails, probe now fails instead of falling back
to polling.
Would you be happy with that change, or would you prefer to retain the
original fallback on IRQ request failure as well?
The reworked patch builds on arm64, but I have not tested it on hardware.
Thanks,
Yaohan