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

Commit 0819398f authored by David Collins's avatar David Collins
Browse files

regulator: cpr3-regulator: conditionally enable thread aggregation for CPRh



Enable CPR hardware thread aggregation for CPRh controllers which
manage more than one thread.  This ensures that CPR closed-loop
operation acts upon the up or down recommendation from each
CPR sensor measurement.

Change-Id: I30f74c6f22133358aa316933d2bf83f5b0b8af9c
Signed-off-by: default avatarDavid Collins <collinsd@codeaurora.org>
parent 13ce0881
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -1382,6 +1382,11 @@ static int cpr3_regulator_init_cprh(struct cpr3_controller *ctrl)
			(ctrl->use_dynamic_step_quot
			? CPR4_MARGIN_ADJ_CTL_PER_RO_KV_MARGIN_EN : 0));

	if (ctrl->thread_count > 1)
		cpr3_masked_write(ctrl, CPR4_REG_CPR_TIMER_CLAMP,
				  CPR4_CPR_TIMER_CLAMP_THREAD_AGGREGATION_EN,
				  CPR4_CPR_TIMER_CLAMP_THREAD_AGGREGATION_EN);

	if (ctrl->voltage_settling_time) {
		/*
		 * Configure the settling timer used to account for