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

Commit a3498768 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-qg: Cap the FULL SOC to 99"

parents 01779df7 9658e6cd
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
/* Copyright (c) 2018 The Linux Foundation. All rights reserved.
/* Copyright (c) 2018-2019 The Linux Foundation. All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 and
@@ -2671,6 +2671,7 @@ static int qg_determine_pon_soc(struct qpnp_qg *chip)
			pr_err("Failed to lookup FULL_SOC@PON rc=%d\n", rc);
			goto done;
		}
		full_soc = CAP(0, 99, full_soc);

		rc = lookup_soc_ocv(&cutoff_soc,
				chip->dt.vbatt_cutoff_mv * 1000,
@@ -2688,7 +2689,7 @@ static int qg_determine_pon_soc(struct qpnp_qg *chip)

		qg_dbg(chip, QG_DEBUG_PON, "v_float=%d v_cutoff=%d FULL_SOC=%d CUTOFF_SOC=%d PON_SYS_SOC=%d pon_soc=%d\n",
			chip->bp.float_volt_uv, chip->dt.vbatt_cutoff_mv * 1000,
			full_soc, cutoff_soc, pon_soc, soc);
			full_soc, cutoff_soc, soc, pon_soc);
	}
done:
	if (rc < 0) {