Report error when PECI temperature read fails.

We used to have flaky PECI temperature read so we ignored failure. Now
the PECI temperature read seems to work fine so we should have it report
error on failure.

Signed-off-by: Vic Yang <victoryang@chromium.org>

BUG=chrome-os-partner:7493
TEST=When powered off, 'temps' shows error on PECI temperature reading.

Change-Id: I161a8f84f66ba06959c21838ee364b2f8d8b4945
This commit is contained in:
Vic Yang
2012-03-01 14:07:31 -08:00
parent 1776aef9f5
commit 1db93690d9
2 changed files with 3 additions and 7 deletions

View File

@@ -53,12 +53,10 @@ int peci_get_cpu_temp(void)
int peci_temp_sensor_poll(void)
{
int val = peci_get_cpu_temp();
last_temp_val = peci_get_cpu_temp();
if (val > 0) {
last_temp_val = val;
if (last_temp_val > 0)
return EC_SUCCESS;
}
else
return EC_ERROR_UNKNOWN;
}

View File

@@ -144,10 +144,8 @@ static void thermal_process(void)
continue;
cur_temp = temp_sensor_read(i);
/* Sensor failure. */
/* TODO: PECI temperature sensor is currently flaky and thus
* sensor failure is now ignored. Change this when we have
* reliable PECI temperature sensor. */
if (cur_temp == -1) {
if (flag & THERMAL_CONFIG_WARNING_ON_FAIL)
smi_sensor_failure_warning();