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

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

power: qpnp-fg-gen4: Reduce ESR fast calibration time to 50s



For a fresh boot, FG calibrates the impedance of the battery rapidly.
This causes the system to wake about 10 ~ 30 times in a span of 300
seconds, which is deemed too long to keep waking up the device from
sleep, while 50s is an acceptable value.

Change it.

Change-Id: I97f6bb94b4f4e75727cdc41e4561028cc3243a47
Signed-off-by: default avatarHarry Yang <harryy@codeaurora.org>
parent 70908b04
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -2480,8 +2480,8 @@ static int fg_gen4_esr_fast_calib_config(struct fg_gen4_chip *chip, bool en)
	}

	if (en) {
		/* Set ESR fast calibration timer to 300 seconds as default */
		esr_fast_cal_ms = 300000;
		/* Set ESR fast calibration timer to 50 seconds as default */
		esr_fast_cal_ms = 50000;
		if (chip->dt.esr_timer_chg_fast > 0 &&
			chip->dt.delta_esr_disable_count > 0)
			esr_fast_cal_ms = 3 * chip->dt.delta_esr_disable_count *
@@ -3640,7 +3640,7 @@ static int fg_parse_ki_coefficients(struct fg_dev *fg)
	return 0;
}

#define DEFAULT_ESR_DISABLE_COUNT	10
#define DEFAULT_ESR_DISABLE_COUNT	5
#define DEFAULT_ESR_FILTER_FACTOR	2
#define DEFAULT_DELTA_ESR_THR		1832
static int fg_parse_esr_cal_params(struct fg_dev *fg)