diff options
author | Zick Wei <zick.wei@quanta.corp-partner.google.com> | 2021-07-09 16:02:19 +0800 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2021-07-20 02:18:20 +0000 |
commit | 0f91a4ed8c55e338f287f4d0baec2253c6111b6e (patch) | |
tree | 97aa32e4a62702a255e31404ae9c04686c57ff01 | |
parent | 1d0e31a1e4983e4d99ce04490bd8378204d65708 (diff) | |
download | chrome-ec-0f91a4ed8c55e338f287f4d0baec2253c6111b6e.tar.gz |
berknip: not read thermistor in S5
The thermistor: TEMP_SENSOR_SOC and TEMP_SENSOR_5V_REGULATOR
are powerd by S5 power rail,
EC will get abnormal temperature: 100C when DUT get from G3 to S5,
we ignore thermistor temperature in S5.
BUG=none
BRANCH=zork
TEST=verify there's no shutdown/prochot message during EC power on.
Signed-off-by: Zick Wei <zick.wei@quanta.corp-partner.google.com>
Change-Id: Id686375aa50cbbe01384b629b1098a574b3c35fa
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3015909
Reviewed-by: Denis Brockus <dbrockus@chromium.org>
-rw-r--r-- | board/berknip/board.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/board/berknip/board.c b/board/berknip/board.c index f06711f801..e883300f1c 100644 --- a/board/berknip/board.c +++ b/board/berknip/board.c @@ -396,6 +396,11 @@ int board_get_temp(int idx, int *temp_k) if (chipset_in_state(CHIPSET_STATE_HARD_OFF)) return EC_ERROR_NOT_POWERED; + /* adc power not ready when transition to S5 */ + if (chipset_in_or_transitioning_to_state( + CHIPSET_STATE_SOFT_OFF)) + return EC_ERROR_NOT_POWERED; + channel = ADC_TEMP_SENSOR_SOC; break; case TEMP_SENSOR_5V_REGULATOR: @@ -403,6 +408,11 @@ int board_get_temp(int idx, int *temp_k) if (chipset_in_state(CHIPSET_STATE_HARD_OFF)) return EC_ERROR_NOT_POWERED; + /* adc power not ready when transition to S5 */ + if (chipset_in_or_transitioning_to_state( + CHIPSET_STATE_SOFT_OFF)) + return EC_ERROR_NOT_POWERED; + channel = ADC_TEMP_SENSOR_5V_REGULATOR; break; default: |