[PATCH v2] thermal: spacemit: k1: add shutdown action and reorder registration order

Troy Mitchell troy.mitchell at linux.spacemit.com
Wed Jul 22 00:54:41 PDT 2026


On Thu Jul 16, 2026 at 12:04 AM PDT, Pei Xiao wrote:
> Add a devm action to clean hardware interrupts, sampling, and control
> registers on driver unbind, mirroring what k1_tsensor_init() sets up.
>
> Reorder the registration order within probe(): register the thermal
> zones first, then request the IRQ, and register the shutdown action
> last.  On removal, the hardware interrupt is disabled first, then the
> IRQ is released, and finally the thermal zones are released.  This
> avoids the IRQ thread accessing an already unregistered thermal zone
> during devres cleanup.
>
> Signed-off-by: Pei Xiao <xiaopei01 at kylinos.cn>
Reviewed-by: Troy Mitchell <troy.mitchell at linux.spacemit.com>

Thanks.



More information about the linux-riscv mailing list