power: pm8921-charger: fix DC issue
The current code does not start the unplug check worker if dc
path is used. This is because it assumes an external charger
for the DC path.
Reorganize the DC insertion handler to check whether an external
charger is used. If not, call the unplug check worker since we
are running in a configuration where the DC path on pm8921 charger
is used.
Also update the code such that hkadc calibration is called when a
dc charger is plugged in, similar to when the usb charger is plugged
in. This is to avoid inaccuracies because of shifts in MBG when a
charger (either DC or USB) is inserted.
CRs-Fixed: 403147
Change-Id: I11a17fc105dea398140abc1a59e6355e9e55b322
Signed-off-by: Abhijeet Dharmapurikar <adharmap@codeaurora.org>
2 files changed