Skip to content
This repository has been archived by the owner on Jul 3, 2023. It is now read-only.

Commit

Permalink
drivers/power: force fastcharge when POWER_SUPPLY_PROP_CURRENT_MAX
Browse files Browse the repository at this point in the history
default to max current if fastcharge doesn't succeed.

Change-Id: Ib32361602ce93ea34138ee6dcad9f4b3c5936b42
Signed-off-by: Vaisakh Murali <[email protected]>
  • Loading branch information
mvaisakh committed Jun 7, 2023
1 parent 895c53f commit 9c46cd2
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions drivers/power/supply/qcom/qpnp-smb5.c
Original file line number Diff line number Diff line change
Expand Up @@ -1509,9 +1509,8 @@ static int smb5_usb_get_prop(struct power_supply *psy,
val->intval = get_client_vote(chg->usb_icl_votable, PD_VOTER);
break;
case POWER_SUPPLY_PROP_CURRENT_MAX:
if (smblib_get_fastcharge_mode(chg))
val->intval = 6000000;
else
rc = smblib_set_fastcharge_mode(chg, true);
if (!rc)
rc = smblib_get_prop_input_current_max(chg, val);
break;
case POWER_SUPPLY_PROP_TYPE:
Expand Down

0 comments on commit 9c46cd2

Please sign in to comment.