diff options
author | Scott Collyer <scollyer@google.com> | 2019-02-20 18:36:38 -0800 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2019-03-11 12:27:22 -0700 |
commit | 978a628ecba284566bd1a5894133a74fc67424b5 (patch) | |
tree | 00344e59132c778af41b233b4d799754628666c4 /common/thermal.c | |
parent | 6674b24ac5a1a4fe05fe5b4d2c74e9981b4304b0 (diff) | |
download | chrome-ec-978a628ecba284566bd1a5894133a74fc67424b5.tar.gz |
thermal: Don't send thermal warning while in G3
There may be certain states when temperature sensors can't be
read. For instance a thermistor circuit could be tied to a power rail
that is only up when the AP is out of G3. In the function
thermal_control when there are no sensors read, it's calling a
function that adds a warning message to the EC log and sets a host
event. If the AP is in G3.
This CL adds a check for chipset state to guard against adding EC log
messages when it would be an expected state.
BUG=b:123297357
BRANCH=none
TEST=Forced AP into G3 with 'aps' and verified that the log message
"can't read any temp sensors!" is no longer being generated.
Change-Id: Id4d73f58e1d3a6d3c24b9888b385cc5e6f803782
Signed-off-by: Scott Collyer <scollyer@google.com>
Reviewed-on: https://chromium-review.googlesource.com/1481405
Commit-Ready: Scott Collyer <scollyer@chromium.org>
Tested-by: Scott Collyer <scollyer@chromium.org>
Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
Reviewed-by: Furquan Shaikh <furquan@chromium.org>
Diffstat (limited to 'common/thermal.c')
-rw-r--r-- | common/thermal.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/common/thermal.c b/common/thermal.c index 4426aa9ae9..3591343a06 100644 --- a/common/thermal.c +++ b/common/thermal.c @@ -119,8 +119,15 @@ static void thermal_control(void) * bringup of a new board, where we haven't debugged the I2C * bus to the sensors; forcing a shutdown in that case would * merely hamper board bringup. + * + * If in G3, then there is no need trigger an SMI event since + * the AP is off and this can be an expected state if + * temperature sensors are powered by a power rail that's only + * on if the AP is out of G3. Note this could be 'ANY_OFF' as + * well, but that causes the thermal unit test to fail. */ - smi_sensor_failure_warning(); + if (!chipset_in_state(CHIPSET_STATE_HARD_OFF)) + smi_sensor_failure_warning(); return; } |