power: pm8921-charger: Workaround for USB unplug issue
A problem in PM8921 occurs when a dc charger is unplugged which
leads to the result that the USBIN_VALID_IRQ is not triggered.
Fix this by adding a worker that verifies the sign on the battery
current as well as checking the VIN_ACTIVE loop. If that is the
case we increase the VIN_MIN threshold to trigger the
USBIN_VALID_IRQ to go low.
Also since this worker won't run while the device is suspended,
use the loop change irq to wakeup the device and run the workaround.
While entering suspend, if the usb is plugged in enable the loop change
irq and mark it up as wakeup interrupt. While resuming restore the
state of loop change irq.
CRs-Fixed: 327861, 326190
Change-Id: I3d46847028ffdad94f76d50f498ab37ce1a3d10e
Signed-off-by:
Abhijeet Dharmapurikar <adharmap@codeaurora.org>
Loading
Please sign in to comment