[PATCH 10/10] thermal/drivers/imx91: Use pm_runtime_resume_and_get() in imx91_tmu_change_mode()
Frank Li
Frank.li at oss.nxp.com
Thu Dec 3 12:21:53 PST 2026
On Thu, Dec 03, 2026 at 07:54:21PM +0000, Lee Jones wrote:
> When enabling the thermal zone, imx91_tmu_change_mode() calls
> asynchronous pm_runtime_get() and immediately writes TMU control
> registers before the device has resumed and enabled its clock. On
> error, it also returns without dropping the incremented runtime PM
> usage count.
>
> Use synchronous pm_runtime_resume_and_get() instead.
>
> Fixes: c411d8bf0699 ("thermal/drivers/imx91: Add support for i.MX91 thermal monitoring unit")
> Closes: https://sashiko.dev/#/bug/linux-c0418783-a24c-4ee1-a794-72b47eb4dfce
> Cc: stable at vger.kernel.org
> Signed-off-by: Lee Jones <lee at kernel.org>
> ---
Reviewed-by: Frank Li <Frank.Li at nxp.com>
> drivers/thermal/imx91_thermal.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/thermal/imx91_thermal.c b/drivers/thermal/imx91_thermal.c
> index c3a72df665a8..dbd45a1910f5 100644
> --- a/drivers/thermal/imx91_thermal.c
> +++ b/drivers/thermal/imx91_thermal.c
> @@ -213,7 +213,7 @@ static int imx91_tmu_change_mode(struct thermal_zone_device *tz, enum thermal_de
> int ret;
>
> if (mode == THERMAL_DEVICE_ENABLED) {
> - ret = pm_runtime_get(tmu->dev);
> + ret = pm_runtime_resume_and_get(tmu->dev);
> if (ret < 0)
> return ret;
>
> --
> 2.56.1.911.g883d8bcb20-goog
>
>
More information about the linux-arm-kernel
mailing list