Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit cfe86e48 authored by Harry Yang's avatar Harry Yang
Browse files

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: default avatarHarry Yang <harryy@codeaurora.org>
parent 9ac55848
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -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:
+1 −0
Original line number Diff line number Diff line
@@ -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"