From: Eduardo Valentin Date: Tue, 8 Nov 2016 05:09:15 +0000 (-0800) Subject: thermal: core: add a comment describing the main update loop X-Git-Tag: v4.10-rc1~160^2~1^4~12 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=8772e185f191bf1280445dfe6b4f9c59e725c473;p=karo-tx-linux.git thermal: core: add a comment describing the main update loop Simply marking the main update loop section and adding a comment describing it. Cc: Zhang Rui Cc: linux-pm@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Eduardo Valentin Signed-off-by: Zhang Rui --- diff --git a/drivers/thermal/thermal_core.c b/drivers/thermal/thermal_core.c index 884235f216bd..bf108db6ae5d 100644 --- a/drivers/thermal/thermal_core.c +++ b/drivers/thermal/thermal_core.c @@ -286,6 +286,17 @@ static void thermal_unregister_governors(void) thermal_gov_power_allocator_unregister(); } +/* + * Zone update section: main control loop applied to each zone while monitoring + * + * in polling mode. The monitoring is done using a workqueue. + * Same update may be done on a zone by calling thermal_zone_device_update(). + * + * An update means: + * - Non-critical trips will invoke the governor responsible for that zone; + * - Hot trips will produce a notification to userspace; + * - Critical trip point will cause a system shutdown. + */ static void thermal_zone_device_set_polling(struct thermal_zone_device *tz, int delay) {