summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVic Yang <victoryang@chromium.org>2012-06-21 13:45:12 +0800
committerGerrit <chrome-bot@google.com>2012-06-22 11:12:43 -0700
commit23d9defb2bfa3bbe5b35609be30dfce98b54c9a4 (patch)
treeb9e53059bc28111b8bc761037e71f4a80392e354
parent475808f5c2a74bd9b1de417112fcc37985d737d6 (diff)
downloadchrome-ec-23d9defb2bfa3bbe5b35609be30dfce98b54c9a4.tar.gz
Disable thermal thresholds for TMP006 sensor near CPU
This sensor doesn't provide accurate case temperature. Let's disable thermal thresholds for the object tempearture reading from this sensor. BUG=chrome-os-partner:9599 TEST=Build success. System works fine. Change-Id: I9408de59a3349f944c5e215085da93f23965ebc9 Reviewed-on: https://gerrit.chromium.org/gerrit/25824 Reviewed-by: Vincent Palatin <vpalatin@chromium.org> Reviewed-by: Randall Spangler <rspangler@chromium.org> Commit-Ready: Vic Yang <victoryang@chromium.org> Tested-by: Vic Yang <victoryang@chromium.org>
-rw-r--r--board/link/board_temp_sensor.c2
-rw-r--r--common/thermal.c7
-rw-r--r--include/temp_sensor.h2
3 files changed, 9 insertions, 2 deletions
diff --git a/board/link/board_temp_sensor.c b/board/link/board_temp_sensor.c
index 240f33ca6c..10ced1984f 100644
--- a/board/link/board_temp_sensor.c
+++ b/board/link/board_temp_sensor.c
@@ -30,7 +30,7 @@ const struct temp_sensor_t temp_sensors[TEMP_SENSOR_COUNT] = {
#ifdef CONFIG_TMP006
{"I2C_CPU-Die", TEMP_SENSOR_POWER_VS, TEMP_SENSOR_TYPE_CPU,
tmp006_get_val, 0, 7},
- {"I2C_CPU-Object", TEMP_SENSOR_POWER_VS, TEMP_SENSOR_TYPE_CASE,
+ {"I2C_CPU-Object", TEMP_SENSOR_POWER_VS, TEMP_SENSOR_TYPE_IGNORED,
tmp006_get_val, 1, 7},
{"I2C_PCH-Die", TEMP_SENSOR_POWER_VS, TEMP_SENSOR_TYPE_BOARD,
tmp006_get_val, 2, 7},
diff --git a/common/thermal.c b/common/thermal.c
index eb6b688c3b..d95df670dd 100644
--- a/common/thermal.c
+++ b/common/thermal.c
@@ -172,13 +172,18 @@ static void thermal_process(void)
{
int i, j;
int cur_temp;
+ int flag;
for (i = 0; i < THRESHOLD_COUNT + THERMAL_FAN_STEPS; ++i)
overheated[i] = 0;
for (i = 0; i < TEMP_SENSOR_COUNT; ++i) {
enum temp_sensor_type type = temp_sensors[i].type;
- int flag = thermal_config[type].config_flags;
+
+ if (type == TEMP_SENSOR_TYPE_IGNORED)
+ continue;
+
+ flag = thermal_config[type].config_flags;
if (!temp_sensor_powered(i))
continue;
diff --git a/include/temp_sensor.h b/include/temp_sensor.h
index 85cfcf53ce..db3a8536e9 100644
--- a/include/temp_sensor.h
+++ b/include/temp_sensor.h
@@ -20,6 +20,8 @@ enum temp_sensor_id;
/* Type of temperature sensors. */
enum temp_sensor_type {
+ /* Ignore this temperature sensor. */
+ TEMP_SENSOR_TYPE_IGNORED = -1,
/* CPU temperature sensors. */
TEMP_SENSOR_TYPE_CPU = 0,
/* Other on-board temperature sensors. */