power: smb1351-charger: Fix charger type detection logic
The smb1351 charger needs a couple of fixes to correctly detect
charger type in different scenarios:
1. Currently the DP_DM lines are set to floating in the
apsd_complete handler. But this is too late since the usb
type detection has already taken place. Move this logic to
the usbin_uv handler. Also move the charger removal code to
the smb1351_chg_remove_work function.
2. Rerun apsd during probe in case device was powered on with
DCP or HVDCP connected. Also, update the apsd_rerun logic to
account for the charger being actually removed in the middle
of apsd_rerun.
CRs-Fixed: 985311
Change-Id: Ide3a8e0a5138914e7501d8bb1f949b4e1e14b76a
Signed-off-by:
Devesh Jhunjhunwala <deveshj@codeaurora.org>
Loading
Please register or sign in to comment