diff options
author | Philip Chen <philipchen@google.com> | 2018-12-21 15:10:30 -0800 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2019-01-10 04:49:56 -0800 |
commit | 1f1e33a579ba26e4edd258bd93c5366bd8bc52eb (patch) | |
tree | ad39eeca0e7f58544a26b93c68a1aa1ad175dbf3 /power/sdm845.c | |
parent | 4b718f963d4263365ffffc3e0675a3487bc0b8af (diff) | |
download | chrome-ec-1f1e33a579ba26e4edd258bd93c5366bd8bc52eb.tar.gz |
sdm845: Wait for battery to stablize before boot
According to the comments, we should call battery_wait_for_stable()
to avoid a potential issue.
BUG=b:121392631
BRANCH=None
TEST=Cutoff cheza battery and plug in AC to boot to display
Change-Id: I917622968babe626a4a88bb99c96bc3d864702f9
Signed-off-by: Philip Chen <philipchen@google.com>
Reviewed-on: https://chromium-review.googlesource.com/1389062
Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com>
Tested-by: Philip Chen <philipchen@chromium.org>
Reviewed-by: Wai-Hong Tam <waihong@google.com>
Diffstat (limited to 'power/sdm845.c')
-rw-r--r-- | power/sdm845.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/power/sdm845.c b/power/sdm845.c index eb70c82113..6d72ea4040 100644 --- a/power/sdm845.c +++ b/power/sdm845.c @@ -424,11 +424,14 @@ enum power_state power_chipset_init(void) auto_power_on = 1; } - /* - * TODO(crosbug.com/p/28289): Wait battery stable. - * Some batteries use clock stretching feature, which requires - * more time to be stable. - */ + if (battery_is_present() == BP_YES) { + /* + * (crosbug.com/p/28289): Wait battery stable. + * Some batteries use clock stretching feature, which requires + * more time to be stable. + */ + battery_wait_for_stable(); + } return init_power_state; } |