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

Commit 7930610c authored by qctecmdr's avatar qctecmdr Committed by Gerrit - the friendly Code Review server
Browse files

Merge "power: smb5-lib: Fix CONT_AICL_THRESHOLD configuration"

parents b05ce1f4 2456d7b9
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -832,10 +832,10 @@ static int smblib_set_usb_pd_allowed_voltage(struct smb_charger *chg,
	if (vbus_allowance != CONTINUOUS)
		return 0;

	if (chg->adapter_cc_mode)
		aicl_threshold = AICL_THRESHOLD_MV_IN_CC;
	else
	aicl_threshold = min_allowed_uv / 1000 - CONT_AICL_HEADROOM_MV;
	if (chg->adapter_cc_mode)
		aicl_threshold = min(aicl_threshold, AICL_THRESHOLD_MV_IN_CC);

	rc = smblib_set_charge_param(chg, &chg->param.aicl_cont_threshold,
							aicl_threshold);
	if (rc < 0) {