summaryrefslogtreecommitdiff
path: root/include/thermal.h
diff options
context:
space:
mode:
authorVic Yang <victoryang@google.com>2012-04-05 11:30:16 +0800
committerVic Yang <victoryang@google.com>2012-04-05 11:30:16 +0800
commit94ef5f3ab3dd20ee5558df5607997985b7e2f45c (patch)
treea1b043f930015df215856a08e4cb6d249e0e4e17 /include/thermal.h
parent8ee84c5db542f3a0989c17bf5903ba4da21baf70 (diff)
downloadchrome-ec-94ef5f3ab3dd20ee5558df5607997985b7e2f45c.tar.gz
Increase fan speed control to 5 steps.
Factor out fan speed control for easier adjusting fan speed stepping. Also increase number of fan speed steps from 2 to 5. Signed-off-by: Vic Yang <victoryang@google.com> BUG=chrome-os-partner:8466 TEST=Manual test. Change-Id: I0ff601c0a4f2ed2a4867bdc6e550eb2827404754
Diffstat (limited to 'include/thermal.h')
-rw-r--r--include/thermal.h12
1 files changed, 6 insertions, 6 deletions
diff --git a/include/thermal.h b/include/thermal.h
index ab606baaa8..6259504c01 100644
--- a/include/thermal.h
+++ b/include/thermal.h
@@ -14,6 +14,10 @@
#define THERMAL_CONFIG_NO_FLAG 0x0
#define THERMAL_CONFIG_WARNING_ON_FAIL 0x1
+/* Number of steps for fan speed control. Speed of each step defined
+ * in thermal.c */
+#define THERMAL_FAN_STEPS 5
+
/* Set a threshold temperature to this value to disable the threshold limit. */
#define THERMAL_THRESHOLD_DISABLE 0
@@ -24,12 +28,8 @@
#define THERMAL_THRESHOLD_DISABLE_ALL 0
enum thermal_threshold {
- /* Low fan speed */
- THRESHOLD_FAN_LO = 0,
- /* High fan speed */
- THRESHOLD_FAN_HI,
/* Issue overheating warning */
- THRESHOLD_WARNING,
+ THRESHOLD_WARNING = 0,
/* Shut down CPU */
THRESHOLD_CPU_DOWN,
/* Shut down everything we can */
@@ -43,7 +43,7 @@ struct thermal_config_t {
/* Configuration flags. */
int8_t config_flags;
/* Threshold temperatures. */
- int16_t thresholds[THRESHOLD_COUNT];
+ int16_t thresholds[THRESHOLD_COUNT + THERMAL_FAN_STEPS];
};
/* Set the threshold temperature value. Return -1 on error. */