summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Lee <mike5@huaqin.corp-partner.google.com>2021-06-18 20:57:50 +0800
committerCommit Bot <commit-bot@chromium.org>2021-06-21 18:33:02 +0000
commit83bb9bd1208d30d75bd77cce21d7bc6b58106b2d (patch)
treeb04a3a259b21b8f5183eb46a7e645f454d3653c6
parentd6ff89a16463231757a2490e876aec7631373915 (diff)
downloadchrome-ec-83bb9bd1208d30d75bd77cce21d7bc6b58106b2d.tar.gz
ocpc: Disable linear precharge at ocpc reset state
When linear precharge is enabled, it may affect the charging behavior from the primary charger IC. Therefore as a part of the reset process, we need to disable linear precharge to make sure primary charger can work normally. BUG=b:191347747 BRANCH=dedede TEST=make BOARD=storo pass, and test C0 port can charge normally. Signed-off-by: Mike Lee <mike5@huaqin.corp-partner.google.com> Change-Id: I4c186214aead442fbec99ac0e43df891dd98b302 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2972526 Reviewed-by: Aseda Aboagye <aaboagye@chromium.org> Commit-Queue: Aseda Aboagye <aaboagye@chromium.org>
-rw-r--r--common/ocpc.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/common/ocpc.c b/common/ocpc.c
index 70abfac969..3bc2a265d3 100644
--- a/common/ocpc.c
+++ b/common/ocpc.c
@@ -670,6 +670,13 @@ void ocpc_reset(struct ocpc_data *ocpc)
batt.voltage);
charger_set_voltage(ocpc->active_chg_chip, batt.voltage);
}
+
+ /*
+ * See(b:191347747) When linear precharge is enabled, it may affect
+ * the charging behavior from the primary charger IC. Therefore as
+ * a part of the reset process, we need to disable linear precharge.
+ */
+ ocpc_precharge_enable(false);
}
static void ocpc_set_pid_constants(void)