qcom: smb2: Disable parallel charging on qnovo charging below 2A
Add qnovo as pl charging voter and disable parallel charging when qnovo is enabled with fcc below 2A. Change-Id: Ic03a18318a89344f2bd5c8a72445abe22cd3d142 Signed-off-by: Harry Yang <harryy@codeaurora.org>
This commit is contained in:
parent
9ac55848ca
commit
cfe86e482b
2 changed files with 3 additions and 0 deletions
|
@ -999,6 +999,8 @@ static int smb2_batt_set_prop(struct power_supply *psy,
|
|||
break;
|
||||
case POWER_SUPPLY_PROP_CURRENT_QNOVO:
|
||||
chg->qnovo_fcc_ua = val->intval;
|
||||
vote(chg->pl_disable_votable, PL_QNOVO_VOTER,
|
||||
val->intval != -EINVAL && val->intval < 2000000, 0);
|
||||
rc = rerun_election(chg->fcc_votable);
|
||||
break;
|
||||
case POWER_SUPPLY_PROP_CONSTANT_CHARGE_CURRENT_MAX:
|
||||
|
|
|
@ -37,6 +37,7 @@ enum print_reason {
|
|||
#define USB_PSY_VOTER "USB_PSY_VOTER"
|
||||
#define PL_TAPER_WORK_RUNNING_VOTER "PL_TAPER_WORK_RUNNING_VOTER"
|
||||
#define PL_INDIRECT_VOTER "PL_INDIRECT_VOTER"
|
||||
#define PL_QNOVO_VOTER "PL_QNOVO_VOTER"
|
||||
#define USBIN_I_VOTER "USBIN_I_VOTER"
|
||||
#define USBIN_V_VOTER "USBIN_V_VOTER"
|
||||
#define CHG_STATE_VOTER "CHG_STATE_VOTER"
|
||||
|
|
Loading…
Add table
Reference in a new issue