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

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

regulator: kryo-regulator: Disallow LDO retention mode by default



The default state for kryo-retention regulators is bypassed mode
(i.e BHS), since LDO retention can only be allowed under certain
operation conditions. APCC_PWR_CTL_OVERRIDE should be initialized
to reflect this requirement.

Change-Id: Ibc732bfc44f917a89e144671dbb396fe6b95ce32
Signed-off-by: default avatarOsvaldo Banuelos <osvaldob@codeaurora.org>
parent 87d13f7a
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -518,6 +518,12 @@ static int kryo_hw_init(struct kryo_regulator *kvreg)
	kryo_masked_write(kvreg, APC_PWR_GATE_DLY, APC_PWR_GATE_DLY_MASK,
			   APC_PWR_GATE_DLY_INIT);

	/* Allow LDO retention mode only when it's safe to do so */
	kryo_pm_apcc_masked_write(kvreg,
				  APCC_PWR_CTL_OVERRIDE,
				  APCC_PGS_MASK(kvreg->cluster_num),
				  APCC_PGS_MASK(kvreg->cluster_num));

	/* Complete the above writes before other accesses */
	mb();