diff options
author | Ashay Jaiswal <ashayj@codeaurora.org> | 2017-04-26 14:34:29 +0530 |
---|---|---|
committer | Ashay Jaiswal <ashayj@codeaurora.org> | 2017-04-26 15:32:33 +0530 |
commit | d1f5c07537952054494be65dfc30342356f072ea (patch) | |
tree | 875494bfe15a1d920c36c6682e785d775fb34baa /drivers/power | |
parent | 048c70075fecb8f92d923fc5595efa00f2a00082 (diff) |
power: smb-lib: Fix charger type reporting
Charger type gets updated in 'smblib_update_usb_type' function
and this should only be called after completion of APSD.
Update the calling sites of 'smblib_update_usb_type' to use
'smblib_get_apsd_result' instead of 'smblib_update_usb_type'.
This ensures charger type doesn't get updated inadvertently.
CRs-Fixed: 2038837
Change-Id: Iaa380c8f02bb71ad0f4367c16ec39d86d825dfa2
Signed-off-by: Ashay Jaiswal <ashayj@codeaurora.org>
Diffstat (limited to 'drivers/power')
-rw-r--r-- | drivers/power/supply/qcom/smb-lib.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/power/supply/qcom/smb-lib.c b/drivers/power/supply/qcom/smb-lib.c index 1e417e8aa22d..2d33ab502365 100644 --- a/drivers/power/supply/qcom/smb-lib.c +++ b/drivers/power/supply/qcom/smb-lib.c @@ -2816,7 +2816,7 @@ int smblib_get_prop_fcc_delta(struct smb_charger *chg, int smblib_get_charge_current(struct smb_charger *chg, int *total_current_ua) { - const struct apsd_result *apsd_result = smblib_update_usb_type(chg); + const struct apsd_result *apsd_result = smblib_get_apsd_result(chg); union power_supply_propval val = {0, }; int rc = 0, typec_source_rd, current_ua; bool non_compliant; @@ -3330,7 +3330,7 @@ static void smblib_handle_hvdcp_3p0_auth_done(struct smb_charger *chg, static void smblib_handle_hvdcp_check_timeout(struct smb_charger *chg, bool rising, bool qc_charger) { - const struct apsd_result *apsd_result = smblib_update_usb_type(chg); + const struct apsd_result *apsd_result = smblib_get_apsd_result(chg); /* Hold off PD only until hvdcp 2.0 detection timeout */ if (rising) { |