power: qpnp-smbcharger: remove current limit vote on charger removal
Remove vote for input current limit(ICL) on charger removal, this will make sure ICL voter state is updated on charger removal and vote for next insertion is not discarded as duplicate request. CRs-Fixed: 981047 Change-Id: Iab16d12d27920183251820659c40d149c01b731e Signed-off-by: Ashay Jaiswal <ashayj@codeaurora.org>
This commit is contained in:
parent
e8d2d9090d
commit
53357feb74
|
@ -4191,9 +4191,18 @@ static int smbchg_change_usb_supply_type(struct smbchg_chip *chip,
|
|||
if (!chip->skip_usb_notification)
|
||||
power_supply_set_supply_type(chip->usb_psy, type);
|
||||
|
||||
/* otherwise if it is unknown, set type after the vote */
|
||||
if (type == POWER_SUPPLY_TYPE_UNKNOWN)
|
||||
/*
|
||||
* otherwise if it is unknown, remove vote
|
||||
* and set type after the vote
|
||||
*/
|
||||
if (type == POWER_SUPPLY_TYPE_UNKNOWN) {
|
||||
rc = vote(chip->usb_icl_votable, PSY_ICL_VOTER, false,
|
||||
current_limit_ma);
|
||||
if (rc < 0)
|
||||
pr_err("Couldn't remove ICL vote rc=%d\n", rc);
|
||||
|
||||
chip->usb_supply_type = type;
|
||||
}
|
||||
|
||||
/* set the correct buck switching frequency */
|
||||
rc = smbchg_set_optimal_charging_mode(chip, type);
|
||||
|
|
Loading…
Reference in New Issue