mirror of
https://github.com/rd-stuffs/msm-4.14.git
synced 2025-02-20 11:45:48 +08:00
power: smb-lib: Set charge current to 100mA when USB is not enumerated
In case of wearables, USB enumeration may fail due to the unclean USB pins. In this case USB driver notifies charger driver with -ETIMEDOUT. Set charge current to minimum of 100mA to enable charging. Change-Id: I9bc87fb3e22841c2e89736c70b71a29428311d31 Signed-off-by: Umang Chheda <uchheda@codeaurora.org>
This commit is contained in:
parent
560e99293a
commit
870449e6c3
@ -2759,6 +2759,10 @@ static int smblib_handle_usb_current(struct smb_charger *chg,
|
||||
if (rc < 0)
|
||||
return rc;
|
||||
}
|
||||
} else if (chg->real_charger_type == POWER_SUPPLY_TYPE_USB &&
|
||||
usb_current == -ETIMEDOUT) {
|
||||
rc = vote(chg->usb_icl_votable, USB_PSY_VOTER,
|
||||
true, USBIN_100MA);
|
||||
} else {
|
||||
rc = vote(chg->usb_icl_votable, USB_PSY_VOTER,
|
||||
true, usb_current);
|
||||
|
Loading…
x
Reference in New Issue
Block a user