power: qpnp-smbcharger: fix parallel enable
Currently the parallel enable function checks for few conditions and
could decide to disable parallel charging. That is against the
function's charter.
Move these checks to the smbchg_is_parallel_usb_ok() function where it
really belongs. Since the calculation of USB current is done there,
return it back. The call sites are expected to pass the returned
USB current to the enable() function if they decide to enable
parallel charging.
Change-Id: Ibc1f716bc287b65602960c87fbde84fc83b57b41
Signed-off-by:
Abhijeet Dharmapurikar <adharmap@codeaurora.org>
Loading
Please register or sign in to comment