[PATCH v4 0/3] thermal: rcar_gen3: fix the interrupt handler lifetimes
From: Yaohan Li
Date: Tue Nov 24 2026 - 22:03:38 EST
This series fixes the order in which rcar_gen3_thermal_probe() and
->remove() create and release the interrupt handlers and the thermal
zones.
Patch 1 moves an existing check; it stands alone.
Patch 2 releases the handlers from ->remove(), before the runtime PM
reference is dropped and before devres unregisters the zones, and
undoes a partial interrupt request instead of leaving the first handler
behind.
Patch 3 requests the interrupts with IRQF_NO_AUTOEN, initialises every
sensor before the request, and enables the interrupts and their sources
only once all the thermal zones are registered.
The driver keeps its ->remove() callback and the existing polling
fallback when an interrupt cannot be requested.
Changes in v4:
- Split into three patches.
- Keep ->remove() and release the handlers explicitly instead of
handing the teardown to devres.
- Request the interrupts with IRQF_NO_AUTOEN and enable them after the
zones are registered.
Compile tested only: arm64, aarch64-linux-gnu-gcc 11.4,
CONFIG_ARCH_RENESAS and CONFIG_RCAR_GEN3_THERMAL. No R-Car board was
available, so probe, the polling fallback, resume and teardown were not
exercised on hardware.
AI assistance: prepared with Claude (Anthropic) as a coding assistant; the
author reviewed the reasoning and takes responsibility for the content.
Yaohan Li (3):
thermal: rcar_gen3: check for sensors before reading the fuses
thermal: rcar_gen3: release the interrupt handlers from ->remove()
thermal: rcar_gen3: do not enable the interrupts before the zones
exist
drivers/thermal/renesas/rcar_gen3_thermal.c | 96 +++++++++++++++------
1 file changed, 72 insertions(+), 24 deletions(-)
--
2.34.1