Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 4bf54be3 authored by Xiaozhe Shi's avatar Xiaozhe Shi Committed by Gerrit - the friendly Code Review server
Browse files

power: qpnp-smbcharger: fix parallel charging first enable



Currently the parallel charging check code "smbchg_is_parallel_usb_ok"
returns false if the parallel charger has been disabled within the last
30 seconds. The very first time the parallel charger is enabled, this
condition is considered true because the last_disabled timestamp is set
to the boot time.

In the "smbchg_parallel_usb_check_ok" function, parallel charging is
disabled if the "smbchg_is_parallel_usb_ok" returns false. This makes it
so that the first attempt at parallel charging always fails.

Fix this by skipping the last_disabled timestamp check if parallel
charging is already enabled.

CRs-Fixed: 880076
Change-Id: Id7f2798e04da343806a3919e55f52932ef0a0c40
Signed-off-by: default avatarXiaozhe Shi <xiaozhes@codeaurora.org>
parent db6a5ac3
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment