mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2026-01-09 17:11:42 +00:00
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:
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user