]> git.karo-electronics.de Git - linux-beck.git/commitdiff
thermal: core: add a comment describing the main update loop
authorEduardo Valentin <edubezval@gmail.com>
Tue, 8 Nov 2016 05:09:15 +0000 (21:09 -0800)
committerZhang Rui <rui.zhang@intel.com>
Wed, 23 Nov 2016 02:06:12 +0000 (10:06 +0800)
Simply marking the main update loop section and adding a
comment describing it.

Cc: Zhang Rui <rui.zhang@intel.com>
Cc: linux-pm@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Eduardo Valentin <edubezval@gmail.com>
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
drivers/thermal/thermal_core.c

index 884235f216bd30c7f5adff77fdf07ce243597ce6..bf108db6ae5dddb89d6a1ca1b16878d3694d4537 100644 (file)
@@ -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)
 {