summaryrefslogtreecommitdiff
path: root/drivers/regulator
diff options
context:
space:
mode:
authorAnirudh Ghayal <aghayal@codeaurora.org>2016-05-26 15:19:19 +0530
committerTirupathi Reddy <tirupath@codeaurora.org>2016-12-05 11:17:01 +0530
commitd1c74c81df76e2b8c810df29a205dd504f576a8f (patch)
treedb72026f41325fa5e7b82485a765b3acbc4d79f6 /drivers/regulator
parent9115687acf080a3ae1f162708e7764d573986ced (diff)
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: Anirudh Ghayal <aghayal@codeaurora.org>
Diffstat (limited to 'drivers/regulator')
-rw-r--r--drivers/regulator/msm_gfx_ldo.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/regulator/msm_gfx_ldo.c b/drivers/regulator/msm_gfx_ldo.c
index 2b331ff5f95e..5c97bc04ad87 100644
--- a/drivers/regulator/msm_gfx_ldo.c
+++ b/drivers/regulator/msm_gfx_ldo.c
@@ -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;