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:
Xiaozhe Shi <xiaozhes@codeaurora.org>
Loading
Please register or sign in to comment