summaryrefslogtreecommitdiff
path: root/include/thermal.h
diff options
context:
space:
mode:
authorRandall Spangler <rspangler@chromium.org>2012-10-25 16:41:00 -0700
committerGerrit <chrome-bot@google.com>2012-10-26 13:10:57 -0700
commitbff5a49e6d06c13e67b1a72470dc1d9a2326eb16 (patch)
tree20fe2704ed432ff31df9acca23a5bebbb81609a2 /include/thermal.h
parentd5dec77a950e67b387cf84e61ad85ec84e4f97d9 (diff)
downloadchrome-ec-bff5a49e6d06c13e67b1a72470dc1d9a2326eb16.tar.gz
Clean up thermal modules
No functional changes. BUG=chrome-os-partner:15579 BRANCH=none TEST='temps' should print good temperatures Change-Id: I20bd2376b86f1e9d2f9a91016ed90bb933235021 Signed-off-by: Randall Spangler <rspangler@chromium.org> Reviewed-on: https://gerrit.chromium.org/gerrit/36611
Diffstat (limited to 'include/thermal.h')
-rw-r--r--include/thermal.h34
1 files changed, 15 insertions, 19 deletions
diff --git a/include/thermal.h b/include/thermal.h
index 8b32bf9773..3e43dfcd1a 100644
--- a/include/thermal.h
+++ b/include/thermal.h
@@ -9,40 +9,37 @@
#define __CROS_EC_THERMAL_H
#include "temp_sensor.h"
-#include "util.h"
#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 */
+/*
+ * Number of steps for fan speed control. Speed of each step is 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
-/* This macro is used to disable all threshold for a sensor.
- * The value 0 expands to all field in the array 'thresholds'. Change this
- * if THERMAL_THRESHOLD_DISABLE is no longer 0.
+/* This macro is used to disable all threshold for a sensor. The value 0
+ * expands to all field in the array 'thresholds'. Change this if
+ * THERMAL_THRESHOLD_DISABLE is no longer 0.
*/
#define THERMAL_THRESHOLD_DISABLE_ALL 0
enum thermal_threshold {
- /* Issue overheating warning */
- THRESHOLD_WARNING = 0,
- /* Shut down CPU */
- THRESHOLD_CPU_DOWN,
- /* Shut down everything we can */
- THRESHOLD_POWER_DOWN,
-
+ THRESHOLD_WARNING = 0, /* Issue overheating warning */
+ THRESHOLD_CPU_DOWN, /* Shut down CPU */
+ THRESHOLD_POWER_DOWN, /* Shut down everything we can */
THRESHOLD_COUNT
};
-/* Configuration for temperature sensor. Temperature value in degree K. */
+/* Configuration for temperature sensor */
struct thermal_config_t {
- /* Configuration flags. */
+ /* Configuration flags */
int8_t config_flags;
- /* Threshold temperatures. */
+ /* Threshold temperatures in K */
int16_t thresholds[THRESHOLD_COUNT + THERMAL_FAN_STEPS];
};
@@ -74,8 +71,7 @@ int thermal_get_threshold(enum temp_sensor_type type, int threshold_id);
* Enable/disable automatic fan speed control
*
* @param enable Enable (!=0) or disable (0) auto fan control
- *
- * @return EC_SUCCESS if successful, non-zero if error. */
-int thermal_control_fan(int enable);
+ */
+void thermal_control_fan(int enable);
#endif /* __CROS_EC_THERMAL_H */