summaryrefslogtreecommitdiff
path: root/zephyr/subsys
diff options
context:
space:
mode:
authorPeter Marheine <pmarheine@chromium.org>2022-08-17 14:19:35 +1000
committerChromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com>2022-08-22 23:41:23 +0000
commit98d580779c8870b19cc8696dd487ac76a166655f (patch)
treeebdde61d2e2aa0149d73f08543db6369d68fcbce /zephyr/subsys
parent595cda08a9c16a7013c8ccf102efe7145193eeae (diff)
downloadchrome-ec-98d580779c8870b19cc8696dd487ac76a166655f.tar.gz
Revert "zephyr: ap_pwrseq: Handle low battery charge"
This reverts commit e7d8c9f84a65f389f4fda5d000b243c8b56e0ea5. Use of battery state change incorrectly expresses the desired outcome, causing wrong behavior in multiple situations: * If the EC starts and the AP should remain off (handled by the power button task), it automatically starts as soon as the battery charge state changes. * When resuming from hibernate with a fully-charged battery, startup can be wrongly inhibited due to a race with PD negotiation. It seems that blocking startup should already be handled elsewhere so why that doesn't work needs to be further investigated, and this attempt at a fix turns out to cause further problems so it should be reverted. BUG=b:242627237,b:240638348,b:234049176 TEST=Nereid bootup from hibernate is not inhibited by uninitialized charger state. BRANCH=none Change-Id: I2ba40d0349f73444b359d1740fe7b01762dc5b3e Signed-off-by: Peter Marheine <pmarheine@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3834906 Reviewed-by: Andrew McRae <amcrae@google.com> Code-Coverage: Zoss <zoss-cl-coverage@prod.google.com>
Diffstat (limited to 'zephyr/subsys')
-rw-r--r--zephyr/subsys/ap_pwrseq/ap_power_interface.c7
-rw-r--r--zephyr/subsys/ap_pwrseq/x86_non_dsx_common_pwrseq_sm_handler.c6
2 files changed, 0 insertions, 13 deletions
diff --git a/zephyr/subsys/ap_pwrseq/ap_power_interface.c b/zephyr/subsys/ap_pwrseq/ap_power_interface.c
index d6ab898d4f..6186e299dd 100644
--- a/zephyr/subsys/ap_pwrseq/ap_power_interface.c
+++ b/zephyr/subsys/ap_pwrseq/ap_power_interface.c
@@ -118,10 +118,3 @@ void ap_power_exit_hardoff(void)
void ap_power_init_reset_log(void)
{
}
-
-#if !defined(CONFIG_CHARGER)
-bool ap_power_is_ok_to_power_up(void)
-{
- return true;
-}
-#endif
diff --git a/zephyr/subsys/ap_pwrseq/x86_non_dsx_common_pwrseq_sm_handler.c b/zephyr/subsys/ap_pwrseq/x86_non_dsx_common_pwrseq_sm_handler.c
index f812338b93..0711dd30e4 100644
--- a/zephyr/subsys/ap_pwrseq/x86_non_dsx_common_pwrseq_sm_handler.c
+++ b/zephyr/subsys/ap_pwrseq/x86_non_dsx_common_pwrseq_sm_handler.c
@@ -249,12 +249,6 @@ static int common_pwr_sm_run(int state)
break;
case SYS_POWER_STATE_G3S5:
- if (!ap_power_is_ok_to_power_up()) {
- LOG_INF("Power up inhibited!");
- ap_power_force_shutdown(
- AP_POWER_SHUTDOWN_BATTERY_INHIBIT);
- return SYS_POWER_STATE_G3;
- }
if ((power_get_signals() & PWRSEQ_G3S5_UP_SIGNAL) ==
PWRSEQ_G3S5_UP_VALUE)
return SYS_POWER_STATE_S5;