summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLinux Build Service Account <lnxbuild@quicinc.com>2017-12-14 00:14:37 -0800
committerGerrit - the friendly Code Review server <code-review@localhost>2017-12-14 00:14:37 -0800
commitbd5f048ed15c2a2b0f000039a7dae2b68763cb17 (patch)
tree635eb70f60ade2c70503d444547d2cfe9dbbcb6c
parent4f3110700c084193236cdbdcea0341d16696c115 (diff)
parent379e51857326b55be863eb9d2e8930de831ff54a (diff)
Merge "power: smb-lib: fix OTG enable error handling"
-rw-r--r--drivers/power/supply/qcom/smb-lib.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/power/supply/qcom/smb-lib.c b/drivers/power/supply/qcom/smb-lib.c
index 7acf5fab573b..6d3316b934de 100644
--- a/drivers/power/supply/qcom/smb-lib.c
+++ b/drivers/power/supply/qcom/smb-lib.c
@@ -669,6 +669,7 @@ static void smblib_uusb_removal(struct smb_charger *chg)
vote(chg->pl_enable_votable_indirect, USBIN_I_VOTER, false, 0);
vote(chg->pl_enable_votable_indirect, USBIN_V_VOTER, false, 0);
vote(chg->usb_icl_votable, SW_QC3_VOTER, false, 0);
+ vote(chg->usb_icl_votable, USBIN_USBIN_BOOST_VOTER, false, 0);
cancel_delayed_work_sync(&chg->hvdcp_detect_work);
@@ -1451,6 +1452,8 @@ int smblib_vbus_regulator_enable(struct regulator_dev *rdev)
rc = _smblib_vbus_regulator_enable(rdev);
if (rc >= 0)
chg->otg_en = true;
+ else
+ vote(chg->usb_icl_votable, USBIN_USBIN_BOOST_VOTER, false, 0);
unlock:
mutex_unlock(&chg->otg_oc_lock);
@@ -3980,6 +3983,7 @@ static void smblib_handle_typec_removal(struct smb_charger *chg)
vote(chg->pl_enable_votable_indirect, USBIN_V_VOTER, false, 0);
vote(chg->awake_votable, PL_DELAY_VOTER, false, 0);
+ vote(chg->usb_icl_votable, USBIN_USBIN_BOOST_VOTER, false, 0);
chg->vconn_attempts = 0;
chg->otg_attempts = 0;
chg->pulse_cnt = 0;