diff options
author | Rob Barnes <robbarnes@google.com> | 2021-02-12 09:16:53 -0700 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2021-02-16 19:00:52 +0000 |
commit | fc0bc62708cb39fb4ad0d7cc25cf25f3742446b5 (patch) | |
tree | 4482c3a9f3dc24c3ddd069610d49a7cff3d2ae47 | |
parent | fe0f3f8fa7a238a71307cbe2d95eeb108b1a721e (diff) | |
download | chrome-ec-fc0bc62708cb39fb4ad0d7cc25cf25f3742446b5.tar.gz |
guybrush: Don't read memory temp in G3
Memory thermistor is connected to S5 rail.
BUG=b:179065659
BRANCH=None
TEST=Build
Change-Id: I5c412d6c473defae9088251db50cf23b098e2bc2
Signed-off-by: Rob Barnes <robbarnes@google.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2692868
Reviewed-by: Diana Z <dzigterman@chromium.org>
-rw-r--r-- | baseboard/guybrush/baseboard.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/baseboard/guybrush/baseboard.c b/baseboard/guybrush/baseboard.c index 6f1f074f3b..ecc67a2f9c 100644 --- a/baseboard/guybrush/baseboard.c +++ b/baseboard/guybrush/baseboard.c @@ -168,6 +168,7 @@ const struct adc_t adc_channels[] = { BUILD_ASSERT(ARRAY_SIZE(adc_channels) == ADC_CH_COUNT); /* Temp Sensors */ +static int board_get_memory_temp(int, int *); static int board_get_soc_temp(int, int *); const struct temp_sensor_t temp_sensors[] = { [TEMP_SENSOR_SOC] = { @@ -185,7 +186,7 @@ const struct temp_sensor_t temp_sensors[] = { [TEMP_SENSOR_MEMORY] = { .name = "Memory", .type = TEMP_SENSOR_TYPE_BOARD, - .read = get_temp_3v3_30k9_47k_4050b, + .read = board_get_memory_temp, .idx = TEMP_SENSOR_MEMORY, }, [TEMP_SENSOR_CPU] = { @@ -784,6 +785,13 @@ void bc12_interrupt(enum gpio_signal signal) } } +static int board_get_memory_temp(int idx, int *temp_k) +{ + if (chipset_in_state(CHIPSET_STATE_HARD_OFF)) + return EC_ERROR_NOT_POWERED; + return get_temp_3v3_30k9_47k_4050b(idx, temp_k); +} + static int board_get_soc_temp(int idx, int *temp_k) { if (chipset_in_state(CHIPSET_STATE_HARD_OFF)) |