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

Commit bab1006d authored by Osvaldo Banuelos's avatar Osvaldo Banuelos Committed by Gerrit - the friendly Code Review server
Browse files

Revert "regulator: kryo-regulator: disregard M3 LPM counters in notifier path"



This reverts commit 2447b99f
("regulator: kryo-regulator: disregard M3 LPM counters in
notifier path").

The unexpected cluster unprepare notification for M4M received by the
Kryo regulator driver when the M4M was never configured for LPMs has
been root caused. Reintroduce the M3 enter and exit counter check in
the LPM resume notifier path.

Change-Id: I72820c597a1e9e5970896484b1570b76b86afe5e
Signed-off-by: default avatarOsvaldo Banuelos <osvaldob@codeaurora.org>
parent 9df71020
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -916,6 +916,12 @@ static int kryo_regulator_lpm_resume(struct kryo_regulator *kvreg)
	kvreg->lpm_exit_count++;
	spin_unlock_irqrestore(&kvreg->slock, flags);

	if (kvreg->lpm_exit_count != kvreg->lpm_enter_count) {
		kvreg_err(kvreg, "LPM entry/exit counter mismatch, this is not expected: enter=%lx exit=%lx\n",
			  kvreg->lpm_enter_count, kvreg->lpm_exit_count);
		BUG_ON(1);
	}

	return NOTIFY_OK;
}