power: qpnp-charger: handle usb short to gnd OTG case

Over current protection (OCP) at USBIN depends on USB voltage to
function. Thus, a short at USBIN before OTG is enabled causes OCP to
fail.

The workaround uses the inductor current limit during boost to limit
the current drawn during a short and detect a short. If no short
was detected, the inductor limit is raised again. If a short happens
after the limit is raised the OCP circuitry will trigger and protect
the device.

CRs-Fixed: 600036
Change-Id: Ib8d46e9065b8b09100507a46718ed85336e12084
Signed-off-by: David Keitel <dkeitel@codeaurora.org>
1 file changed