diff options
-rw-r--r-- | board/link/board_temp_sensor.c | 2 | ||||
-rw-r--r-- | common/thermal.c | 7 | ||||
-rw-r--r-- | include/temp_sensor.h | 2 |
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. */ |