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

Commit 79abc4f5 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "power: qpnp-bms: use IAVG for charging adjustments"

parents 12105ae3 c85aac2b
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -1881,7 +1881,7 @@ static int charging_adjustments(struct qpnp_bms_chip *chip,
		if (batt_terminal_uv >= chip->max_voltage_uv - VDD_MAX_ERR) {
			chip->soc_at_cv = soc;
			chip->prev_chg_soc = soc;
			chip->ibat_at_cv_ua = ibat_ua;
			chip->ibat_at_cv_ua = params->iavg_ua;
			pr_debug("CC_TO_CV ibat_ua = %d CHG SOC %d\n",
					ibat_ua, soc);
		} else {
@@ -1932,7 +1932,7 @@ static int charging_adjustments(struct qpnp_bms_chip *chip,
	soc_ibat = bound_soc(linear_interpolate(chip->soc_at_cv,
					chip->ibat_at_cv_ua,
					100, -1 * chip->chg_term_ua,
					ibat_ua));
					params->iavg_ua));
	weight_ibat = bound_soc(linear_interpolate(1, chip->soc_at_cv,
					100, 100, chip->prev_chg_soc));
	weight_cc = 100 - weight_ibat;