summaryrefslogtreecommitdiff
path: root/include/temp_sensor.h
diff options
context:
space:
mode:
authorVic Yang <victoryang@google.com>2012-03-15 14:55:28 +0800
committerVic Yang <victoryang@google.com>2012-03-16 10:40:52 +0800
commit9f8e8dc6a3461cf0e8e3758db876c7b98c35a92a (patch)
tree02e5ca561dab349f9e74db3a4ecae807a1420888 /include/temp_sensor.h
parent7d1884ee06793b776a8b8af3508e6cb6b7027b3f (diff)
downloadchrome-ec-9f8e8dc6a3461cf0e8e3758db876c7b98c35a92a.tar.gz
Temperature sensor grouping.
Group temperature sensors into different types so we only have to set temperature threshold for each type instead of each sensor. Signed-off-by: Vic Yang <victoryang@google.com> BUG=chrome-os-partner:8466 TEST=Fan control still works. Change-Id: I7acc714c32f282cec490b9e02d402ab91a53becf
Diffstat (limited to 'include/temp_sensor.h')
-rw-r--r--include/temp_sensor.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/include/temp_sensor.h b/include/temp_sensor.h
index f6051824ee..d3ce646a19 100644
--- a/include/temp_sensor.h
+++ b/include/temp_sensor.h
@@ -18,10 +18,24 @@
/* "enum temp_sensor_id" must be defined for each board in board.h. */
enum temp_sensor_id;
+/* Type of temperature sensors. */
+enum temp_sensor_type {
+ /* CPU temperature sensors. */
+ TEMP_SENSOR_TYPE_CPU = 0,
+ /* Other on-board temperature sensors. */
+ TEMP_SENSOR_TYPE_BOARD,
+ /* Case temperature sensors. */
+ TEMP_SENSOR_TYPE_CASE,
+
+ TEMP_SENSOR_TYPE_COUNT
+};
+
struct temp_sensor_t {
const char* name;
/* Flags indicating power needed by temp sensor. */
int8_t power_flags;
+ /* Temperature sensor type. */
+ enum temp_sensor_type type;
/* Read sensor value and return temperature in K. */
int (*read)(int idx);
/* Index among the same kind of sensors. */