summaryrefslogtreecommitdiff
path: root/board/quackingstick
diff options
context:
space:
mode:
authorSue Chen <sue.chen@quanta.corp-partner.google.com>2022-06-29 10:09:12 +0800
committerChromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com>2022-06-29 18:29:37 +0000
commitc5d701455db66b2f052d8b09eaa5f7eb76838efd (patch)
tree0e672a24672dc22d1dd3b09ddb073943cde7a6ca /board/quackingstick
parent34e23e09f9c3334dd7833389da21232a77b6cdd3 (diff)
downloadchrome-ec-c5d701455db66b2f052d8b09eaa5f7eb76838efd.tar.gz
Quackingstick: Delay 2s on the first power on
Delay 2s on first power on because it was found that the battery return wrong D-FET status after resume from cut off. BUG=b:231911921 BRANCH=trogdor TEST=there's no power loss after the battery resume from cutoff Signed-off-by: Sue Chen <sue.chen@quanta.corp-partner.google.com> Change-Id: I1b124023b8dc8a07b40695749ed2493be86c23e0 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3734267 Commit-Queue: Wai-Hong Tam <waihong@google.com> Reviewed-by: Wai-Hong Tam <waihong@google.com>
Diffstat (limited to 'board/quackingstick')
-rw-r--r--board/quackingstick/board.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/board/quackingstick/board.c b/board/quackingstick/board.c
index 0c51a27250..5b2a3a3f0f 100644
--- a/board/quackingstick/board.c
+++ b/board/quackingstick/board.c
@@ -434,6 +434,22 @@ void board_tcpc_init(void)
}
DECLARE_HOOK(HOOK_INIT, board_tcpc_init, HOOK_PRIO_INIT_I2C + 1);
+void board_delay_on_first_power_on(void)
+{
+ /*
+ * b/231911921: It's found that the D-FET status is incorrect
+ * when the battery resume from cut off. The battery needs
+ * about 2s to ready to discharge so delay 2s before charge
+ * manager init.
+ */
+ if (system_get_reset_flags() == EC_RESET_FLAG_POWER_ON) {
+ CPRINTS("Delay 2s on the first power on.");
+ sleep(2);
+ }
+}
+DECLARE_HOOK(HOOK_INIT, board_delay_on_first_power_on,
+ HOOK_PRIO_INIT_CHARGE_MANAGER - 1);
+
void board_hibernate(void)
{
int i;