qcom: smblib: supsend USB input during boost
In parallel configuration, suspend one charger usb input before the other enters boost mode. Even more so in USBIN-USBIN mode. Change-Id: I63728421b7697e70bbd83c4c82203b7ebafdaa9f Signed-off-by: Harry Yang <harryy@codeaurora.org>
This commit is contained in:
parent
4469fe08a7
commit
606d9c3405
2 changed files with 11 additions and 0 deletions
|
@ -1346,6 +1346,14 @@ int smblib_vbus_regulator_enable(struct regulator_dev *rdev)
|
|||
if (chg->otg_en)
|
||||
goto unlock;
|
||||
|
||||
if (!chg->usb_icl_votable) {
|
||||
chg->usb_icl_votable = find_votable("USB_ICL");
|
||||
|
||||
if (!chg->usb_icl_votable)
|
||||
return -EINVAL;
|
||||
}
|
||||
vote(chg->usb_icl_votable, USBIN_USBIN_BOOST_VOTER, true, 0);
|
||||
|
||||
rc = _smblib_vbus_regulator_enable(rdev);
|
||||
if (rc >= 0)
|
||||
chg->otg_en = true;
|
||||
|
@ -1409,6 +1417,8 @@ int smblib_vbus_regulator_disable(struct regulator_dev *rdev)
|
|||
if (rc >= 0)
|
||||
chg->otg_en = false;
|
||||
|
||||
if (chg->usb_icl_votable)
|
||||
vote(chg->usb_icl_votable, USBIN_USBIN_BOOST_VOTER, false, 0);
|
||||
unlock:
|
||||
mutex_unlock(&chg->otg_oc_lock);
|
||||
return rc;
|
||||
|
|
|
@ -50,6 +50,7 @@ enum print_reason {
|
|||
#define VBUS_CC_SHORT_VOTER "VBUS_CC_SHORT_VOTER"
|
||||
#define PD_INACTIVE_VOTER "PD_INACTIVE_VOTER"
|
||||
#define BOOST_BACK_VOTER "BOOST_BACK_VOTER"
|
||||
#define USBIN_USBIN_BOOST_VOTER "USBIN_USBIN_BOOST_VOTER"
|
||||
#define HVDCP_INDIRECT_VOTER "HVDCP_INDIRECT_VOTER"
|
||||
#define MICRO_USB_VOTER "MICRO_USB_VOTER"
|
||||
#define DEBUG_BOARD_VOTER "DEBUG_BOARD_VOTER"
|
||||
|
|
Loading…
Add table
Reference in a new issue