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

Commit dccf45a3 authored by Anirudh Ghayal's avatar Anirudh Ghayal
Browse files

regulator: msm_gfx_ldo: Enable CPR sensors in LDO bypass mode



Enable the configuration which keeps the CPR sensors active
when LDO is in auto-bypass mode. The sensors only stay
bypassed when LDO is regulating.

CRs-Fixed: 1027469
Change-Id: I6b8c2a3fd8fe22a64b6d24c458a7c60641195e45
Signed-off-by: default avatarAnirudh Ghayal <aghayal@codeaurora.org>
parent cc957303
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -45,6 +45,7 @@
#define PWRSWITCH_CTRL_REG		0x1C
#define LDO_CLAMP_IO_BIT		BIT(31)
#define CPR_BYPASS_IN_LDO_MODE_BIT	BIT(30)
#define EN_LDOAP_CTRL_CPR_BIT		BIT(29)
#define PWR_SRC_SEL_BIT			BIT(9)
#define ACK_SW_OVR_BIT			BIT(8)
#define LDO_PREON_SW_OVR_BIT		BIT(7)
@@ -967,9 +968,10 @@ static int msm_gfx_ldo_init(struct platform_device *pdev,

	/* HW initialization */

	/* clear clamp_io */
	/* clear clamp_io, enable CPR in auto-bypass*/
	ctl = readl_relaxed(ldo_vreg->ldo_base + PWRSWITCH_CTRL_REG);
	ctl &= ~LDO_CLAMP_IO_BIT;
	ctl |= EN_LDOAP_CTRL_CPR_BIT;
	writel_relaxed(ctl, ldo_vreg->ldo_base + PWRSWITCH_CTRL_REG);

	i = 0;