diff options
author | Eric Yilun Lin <yllin@chromium.org> | 2020-12-30 06:37:31 +0000 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2020-12-30 06:43:00 +0000 |
commit | c75e57fc181f29deb819c0ff4d7ba38d7202c83b (patch) | |
tree | eb6bec1cd40ab87e7cc0e3fd655d273ebf7ab04a | |
parent | 8e42b8f0fda095cfacd42bf3b23bb540181bc65b (diff) | |
download | chrome-ec-c75e57fc181f29deb819c0ff4d7ba38d7202c83b.tar.gz |
Revert "kukui: do not boot AP if low-battery and no charger"
This reverts commit fbf183f3109d07922fcec6e5a59efaf0788e1962.
Reason for revert: regression fail on FAFT firmware_ECPowerButton
Original change's description:
> kukui: do not boot AP if low-battery and no charger
>
> BUG=b:134101454
> TEST=#define CONFIG_CHARGER_MIN_BAT_PCT_FOR_POWER_ON 96;
> at batt 93%, no adapter, powerbtn, stay at G3
> at batt 93%, with adapter, powerbtn, boot to S0
> at batt 97^, without adapter, powerbtn, boot to S0
> BRANCH=kukui
>
> Change-Id: Ib0ee742ccd1f04aaa173a34455c1333853e0ce50
> Signed-off-by: Eric Yilun Lin <yllin@chromium.org>
> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2597121
Bug: b:134101454
Change-Id: I2c05ccd193d4794100498860f4df33064928e08d
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2607030
Reviewed-by: Eric Yilun Lin <yllin@chromium.org>
Commit-Queue: Eric Yilun Lin <yllin@chromium.org>
Tested-by: Eric Yilun Lin <yllin@chromium.org>
-rw-r--r-- | power/mt8183.c | 19 |
1 files changed, 0 insertions, 19 deletions
diff --git a/power/mt8183.c b/power/mt8183.c index 313116e5b3..1bbd06a05f 100644 --- a/power/mt8183.c +++ b/power/mt8183.c @@ -273,7 +273,6 @@ enum power_state power_handle_state(enum power_state state) * transition to S5, G3. */ static int ap_shutdown; - uint16_t tries = 0; switch (state) { case POWER_G3: @@ -360,24 +359,6 @@ enum power_state power_handle_state(enum power_state state) } #endif - /* - * Allow time for charger to be initialized, in case we're - * trying to boot the AP with no battery. - */ - while (charge_prevent_power_on(0) && - tries++ < CHARGER_INITIALIZED_TRIES) { - msleep(CHARGER_INITIALIZED_DELAY_MS); - } - - /* Return to G3 if battery level is too low. */ - if (charge_want_shutdown() || - tries > CHARGER_INITIALIZED_TRIES) { - CPRINTS("power-up inhibited"); - chipset_force_shutdown( - CHIPSET_SHUTDOWN_BATTERY_INHIBIT); - return POWER_G3; - } - #if CONFIG_CHIPSET_POWER_SEQ_VERSION == 1 hook_call_deferred(&deassert_en_pp1800_s5_l_data, -1); #endif |