summaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authorMike Lee <mike5@huaqin.corp-partner.google.com>2021-07-07 21:18:48 +0800
committerCommit Bot <commit-bot@chromium.org>2021-07-08 02:13:15 +0000
commitf04dc5058b6dad98f8531c24afd311256f344a8d (patch)
treec6824121e9a02b74806eb8f82f37102608a3a48c /common
parent316162198f241a19091e006b82276a1cc21fe60c (diff)
downloadchrome-ec-f04dc5058b6dad98f8531c24afd311256f344a8d.tar.gz
charge_manager: Attempt to detect extpower status
When we first checked the extpower, the AC OK register of the charger was not ready, and the charge_manager did not check again in a short time. so we need attempt to detect extpower status again. BUG=b:192638664 BRANCH=dedede TEST=make BOARD=sasukette pass and the delayed display phenomenon of battery led disappears. Signed-off-by: Mike Lee <mike5@huaqin.corp-partner.google.com> Change-Id: I6c1c3cdc33fb4fa2734cb38f66c53a3f15550037 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3011108 Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
Diffstat (limited to 'common')
-rw-r--r--common/charge_manager.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/common/charge_manager.c b/common/charge_manager.c
index a28629c98c..a20ab33068 100644
--- a/common/charge_manager.c
+++ b/common/charge_manager.c
@@ -833,6 +833,13 @@ static void charge_manager_refresh(void)
CPRINTS("CL: p%d s%d i%d v%d", new_port, new_supplier,
new_charge_current, new_charge_voltage);
+
+ /*
+ * (b:192638664) We try to check AC OK again to avoid
+ * unsuccessful detection in the initial detection.
+ */
+ if (IS_ENABLED(CONFIG_EXTPOWER))
+ board_check_extpower();
}
/*