CHROMIUM: acpi: thermal: honor "mode" sysfs file setting
authorSameer Nanda <snanda@chromium.org>
Wed, 17 Oct 2012 16:49:28 +0000 (09:49 -0700)
committerGerrit <chrome-bot@google.com>
Wed, 17 Oct 2012 18:32:30 +0000 (11:32 -0700)
commit931ce89696e51ba79cd49d5e79f560d323baf74e
treecd890dfa8edc555b1f4c5cea6dedb2273f43688e
parentc0cc5ebc822882cd647a15e57fe4084edab1bfcc
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>
drivers/acpi/thermal.c