power: pm8921-charger: fix race in unplug check worker
When the usb voltage collapses, the driver waits for 50ms and checks
whether the usb voltage has restored. If it has, the driver treats
it as collapse and resets the usb current and the target
current. It assumes that unplug check worker will run and do its
aicl duties to step up the usb current.
However if the unplug check worker runs right at the time when usb
has collapsed it will exit and wont schedule anymore.
To fix this check if the unplug worker is pending, if not, reschedule
it.
Change-Id: I1bb658339e5a6f0adb07fda3ee0bc6c03670cc09
Signed-off-by:
Abhijeet Dharmapurikar <adharmap@codeaurora.org>
Loading
Please register or sign in to comment