summaryrefslogtreecommitdiff
path: root/board/berknip/board.c
diff options
context:
space:
mode:
Diffstat (limited to 'board/berknip/board.c')
-rw-r--r--board/berknip/board.c10
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: