Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

docs: thermal: sync hardware protection doc with code

Originally, the thermal framework's only hardware protection action was to
trigger a shutdown. This has been changed a little over a year ago to
also support rebooting as alternative hardware protection action.

Update the documentation to reflect this.

Link: https://lkml.kernel.org/r/20250217-hw_protection-reboot-v3-3-e1c09b090c0c@pengutronix.de
Fixes: 62e79e38b257 ("thermal/thermal_of: Allow rebooting after critical temp")
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Reviewed-by: Tzung-Bi Shih <tzungbi@kernel.org>
Reviewed-by: Matti Vaittinen <mazziesaccount@gmail.com>
Cc: Benson Leung <bleung@chromium.org>
Cc: Daniel Lezcano <daniel.lezcano@linaro.org>
Cc: Fabio Estevam <festevam@denx.de>
Cc: Guenter Roeck <groeck@chromium.org>
Cc: Jonathan Corbet <corbet@lwn.net>
Cc: Liam Girdwood <lgirdwood@gmail.com>
Cc: Lukasz Luba <lukasz.luba@arm.com>
Cc: Mark Brown <broonie@kernel.org>
Cc: Matteo Croce <teknoraver@meta.com>
Cc: "Rafael J. Wysocki" <rafael@kernel.org>
Cc: Rob Herring (Arm) <robh@kernel.org>
Cc: Rui Zhang <rui.zhang@intel.com>
Cc: Sascha Hauer <kernel@pengutronix.de>
Cc: "Serge E. Hallyn" <serge@hallyn.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>

authored by

Ahmad Fatoum and committed by
Andrew Morton
06eaeaee bbf0ec4f

+14 -11
+14 -11
Documentation/driver-api/thermal/sysfs-api.rst
··· 413 413 device. It sets the cooling device to the deepest cooling state if 414 414 possible. 415 415 416 - 5. thermal_emergency_poweroff 417 - ============================= 416 + 5. Critical Events 417 + ================== 418 418 419 - On an event of critical trip temperature crossing the thermal framework 420 - shuts down the system by calling hw_protection_shutdown(). The 421 - hw_protection_shutdown() first attempts to perform an orderly shutdown 422 - but accepts a delay after which it proceeds doing a forced power-off 423 - or as last resort an emergency_restart. 419 + On an event of critical trip temperature crossing, the thermal framework 420 + will trigger a hardware protection power-off (shutdown) or reboot, 421 + depending on configuration. 422 + 423 + At first, the kernel will attempt an orderly power-off or reboot, but 424 + accepts a delay after which it proceeds to do a forced power-off or 425 + reboot, respectively. If this fails, ``emergency_restart()`` is invoked 426 + as last resort. 424 427 425 428 The delay should be carefully profiled so as to give adequate time for 426 - orderly poweroff. 429 + orderly power-off or reboot. 427 430 428 - If the delay is set to 0 emergency poweroff will not be supported. So a 429 - carefully profiled non-zero positive value is a must for emergency 430 - poweroff to be triggered. 431 + If the delay is set to 0, the emergency action will not be supported. So a 432 + carefully profiled non-zero positive value is a must for the emergency 433 + action to be triggered.