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

Commit dd270f67 authored by Subbaraman Narayanamurthy's avatar Subbaraman Narayanamurthy Committed by Gerrit - the friendly Code Review server
Browse files

power: qpnp-fg: fix address used for storing cc_soc coefficient



When capacity learning feedback is enabled, cc_to_soc
coefficient should get stored in SRAM register 0x578
as specified in the documentation. Fix it.

CRs-Fixed: 870383
Change-Id: Icd8e2770d7060e99388c845e991a2555bff4ba4d
Signed-off-by: default avatarSubbaraman Narayanamurthy <subbaram@codeaurora.org>
parent 84099f52
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -2832,7 +2832,7 @@ static void fg_cap_learning_save_data(struct fg_chip *chip)
			cc_to_soc_coeff = div64_s64(half_float(data), cc_mah);
			half_float_to_buffer(cc_to_soc_coeff, data);
			rc = fg_mem_write(chip, (u8 *)data,
					FG_AGING_STORAGE_REG, 2,
					ACTUAL_CAPACITY_REG, 2,
					CC_SOC_COEFF_OFFSET, 0);
			if (rc)
				pr_err("Failed to write cc_soc_coeff_offset: %d\n",