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

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

Merge "power: qpnp-qg: Update the qg_esr_mod_count based on fifo-length"

parents 553427bb 44f328c2
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -312,6 +312,7 @@ static int qg_store_soc_params(struct qpnp_qg *chip)
	return rc;
}

#define MAX_FIFO_CNT_FOR_ESR			50
static int qg_config_s2_state(struct qpnp_qg *chip,
		enum s2_state requested_state, bool state_enable,
		bool process_fifo)
@@ -369,6 +370,9 @@ static int qg_config_s2_state(struct qpnp_qg *chip,
		return -EINVAL;
	}

	if (fifo_length)
		qg_esr_mod_count = MAX_FIFO_CNT_FOR_ESR / fifo_length;

	rc = qg_master_hold(chip, true);
	if (rc < 0) {
		pr_err("Failed to hold master, rc=%d\n", rc);