diff options
author | Aseda Aboagye <aaboagye@google.com> | 2020-09-25 11:15:39 -0700 |
---|---|---|
committer | Justin TerAvest <teravest@chromium.org> | 2020-09-28 21:52:15 +0000 |
commit | 17da0aa502f8a550b4d4fd78a02fc9455a469270 (patch) | |
tree | 6d8b991632dd283f492879a9ed8a5deee3884b47 /driver | |
parent | 10782c7c87b2d1a702375fb4394d19d5216febd8 (diff) | |
download | chrome-ec-17da0aa502f8a550b4d4fd78a02fc9455a469270.tar.gz |
sm5803: Remove initial VSYS setting in init
The OCPC code will ensure that the first VSYS set point is either the
battery voltage, or if not present, the minimum battery voltage as
specified by the batt_info structure. There's no need to set an
intermediate value here upon init. The default regulation set point
will be set by the strapping resistor on the charger IC before FW even
gets a chance to run.
BUG=b:168730125
BRANCH=None
TEST=Build and flash drawcia. Cutoff battery, wait 15s, plug in
charger on C1, verify that VSYS is not initially set with a bad
voltage.
Signed-off-by: Aseda Aboagye <aaboagye@google.com>
Change-Id: Ibf7c09679fc132c049b79f7ac070d9b3caed794b
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2431694
Tested-by: Aseda Aboagye <aaboagye@chromium.org>
Reviewed-by: Diana Z <dzigterman@chromium.org>
Commit-Queue: Aseda Aboagye <aaboagye@chromium.org>
Diffstat (limited to 'driver')
-rw-r--r-- | driver/charger/sm5803.c | 8 |
1 files changed, 0 insertions, 8 deletions
diff --git a/driver/charger/sm5803.c b/driver/charger/sm5803.c index cf08d7d64e..fe501acd47 100644 --- a/driver/charger/sm5803.c +++ b/driver/charger/sm5803.c @@ -345,7 +345,6 @@ static void sm5803_init(int chgnum) const struct battery_info *batt_info; int pre_term; int cells; - struct batt_params batt_params; /* * If a charger is not currently present, disable switching per OCPC @@ -649,13 +648,6 @@ static void sm5803_init(int chgnum) rv |= chg_read8(chgnum, SM5803_REG_SWITCHER_CONF, ®); reg |= SM5803_SW_BCK_BST_CONF_AUTO; rv |= chg_write8(chgnum, SM5803_REG_SWITCHER_CONF, reg); - } else { - /* - * Set VSYS initially to VBAT to prevent a high voltage upon - * adapter insertion. - */ - battery_get_params(&batt_params); - rv |= charger_set_voltage(chgnum, batt_params.voltage); } if (rv) |