CHROMIUM: acpi: thermal: honor "mode" sysfs file setting
Under each thermal zone there is a file called "mode". Writing enabled
or disabled to this file allows a given thermal zone to be enabled or
disabled. Honor writes to this file by enabling or disabling the
polling timers.
BUG=chrome-os-partner:15347
TEST=stop the thermal loop (stop temp_metrics). Change directory to
/sys/class/thermal/thermal_zone1. Check that trip_point_2_temp is
90000 (90C). Kick off a few CPU load threads (while true; do true;
done). Monitor CPU temperature by reading the temp file in the same
directory. With "mode" file set to "enabled" trip_point_2_temp should
change to 80000 within 10 seconds of temp exceeding 90000. If "mode" is
set to "disabled", trip_point_2_temp should not change.
Change-Id: If27e8ae048fa572b514bc4fba55cd54e68c1d3f9
Signed-off-by: Sameer Nanda <snanda@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/35835
Reviewed-by: Duncan Laurie <dlaurie@chromium.org>
Reviewed-by: Vincent Palatin <vpalatin@chromium.org>