Skip to contentSkip to conversation

thermal core: add option to run PM_POST_SUSPEND asynchronously

RFC New Radu Solea 1 participant 1 message Jul 24, 2023 Thermal

lore
Share & tools
lore

Radu Solea

author
#0 lore raw

RFC 1/1 thermal core: add option to run PM_POST_SUSPEND asynchronously

Some thermal zones are bus connected and slow to resume, thus delaying actions which depend on completion of PM_POST_SUSPEND. Add optional execution path to resume thermal zones on the system unbounded workqueue.

---
 drivers/thermal/Kconfig        | 11 +++++++
 drivers/thermal/thermal_core.c | 58 ++++++++++++++++++++++++++++++----
 2 files changed, 62 insertions(+), 7 deletions(-)
drivers/thermal/Kconfig +11 -0
index 19a4b33cb564..8dbcc62ccf8a 100644
@@ -91,6 +91,17 @@ config THERMAL_WRITABLE_TRIPS
 	  Say 'Y' here if you would like to allow userspace tools to
 	  change trip temperatures.
 
+config THERMAL_ASYNC_RESUME
+	bool "Thermal async init zones on system resume"
+	default n
+	help
+	  Re-initialize thermal zones asynchronously on system resume.
+	  Thermal zone sensors may be attached on slow buses, impacting
+	  the duration of PM_POST_SUSPEND. If that is a concern enable
+	  this switch.
+
+	  If in doubt, say N.
+
 choice
 	prompt "Default Thermal governor"
 	default THERMAL_DEFAULT_GOV_STEP_WISE
drivers/thermal/thermal_core.c +51 -7

95 lines not on this page · raw message

Signature · 1 line
2.41.0.487.g6d72f3e995-goog