]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
thermal: core: Suspend thermal zones later and resume them earlier
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>
Tue, 7 Apr 2026 14:09:21 +0000 (16:09 +0200)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Wed, 8 Apr 2026 10:30:31 +0000 (12:30 +0200)
commitd33e89d12295087afd108a42f5e240ff53820461
treeabb2ab3c8e1cd68db77798b588e5e7929cef94fb
parentc4c6a8646359612db34c76f58799f5206945e365
thermal: core: Suspend thermal zones later and resume them earlier

To avoid some undesirable interactions between thermal zone suspend
and resume with user space that is running when those operations are
carried out, move them closer to the suspend and resume of devices,
respectively, by updating dpm_prepare() to carry out thermal zone
suspend and dpm_complete() to start thermal zone resume (that will
continue asynchronously).

This also makes the code easier to follow by removing one, arguably
redundant, level of indirection represented by the thermal PM notifier.

Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Reviewed-by: Armin Wolf <W_Armin@gmx.de>
Link: https://patch.msgid.link/2036875.PYKUYFuaPT@rafael.j.wysocki
drivers/base/power/main.c
drivers/thermal/thermal_core.c
include/linux/thermal.h