power: pm8921-charger: check vbatdet signal for battery full
The current driver reports a battery full if fsm = 1, the battery is
present and neither the battery nor the charger is hot. However this
could lead to an incorrect reporting as the battery voltage may be
low.
Check the output of vbatdet comparator in addition to the above cases.
Also check the output of vbatdet comparator for end of charging
detection and while at it split, the eoc_worker() function to make it
more readable.
CRs-Fixed: 327890
Change-Id: Iea735b96271da641803670068c1333e5102dc911
Signed-off-by: Abhijeet Dharmapurikar <adharmap@codeaurora.org>
1 file changed