[PATCH 1/1] TWL4030: Activate VDD1, VDD2 and VPLL1 at startup

From: Peter 'p2' De Schrijver
Date: Thu Apr 23 2009 - 09:10:41 EST


This patch activates VDD1, VDD2 and VPLL1 when booting. This is necessary
because these resources are in warm reset state after a reboot. This means
their voltage levels cannot be modified so DVFS and smartreflex don't work.

Signed-off-by: Peter 'p2' De Schrijver <peter.de-schrijver@xxxxxxxxx>
---
drivers/regulator/twl4030-regulator.c | 18 +++++++++++++++++-
1 files changed, 17 insertions(+), 1 deletions(-)

diff --git a/drivers/regulator/twl4030-regulator.c b/drivers/regulator/twl4030-regulator.c
index 80a4e10..ab2a726 100644
--- a/drivers/regulator/twl4030-regulator.c
+++ b/drivers/regulator/twl4030-regulator.c
@@ -506,6 +506,22 @@ static int twl4030reg_probe(struct platform_device *pdev)
}
platform_set_drvdata(pdev, rdev);

+ /* VDD1, VDD2 and VPLL1 are left in warm reset state after a reboot.
+ * We need to put them back to active state for DVFS and smartreflex.
+ */
+
+ if (twl4030_send_pb_msg(MSG_SINGULAR(DEV_GRP_P1, RES_VDD1,
+ RES_STATE_ACTIVE)) < 0)
+ pr_err("Unable to activate VDD1\n");
+
+ if (twl4030_send_pb_msg(MSG_SINGULAR(DEV_GRP_P1, RES_VDD2,
+ RES_STATE_ACTIVE)) < 0)
+ pr_err("Unable to activate VDD2\n");
+
+ if (twl4030_send_pb_msg(MSG_SINGULAR(DEV_GRP_P1, RES_VPLL1,
+ RES_STATE_ACTIVE)) < 0)
+ pr_err("Unable to activate VPLL1\n");
+
/* NOTE: many regulators support short-circuit IRQs (presentable
* as REGULATOR_OVER_CURRENT notifications?) configured via:
* - SC_CONFIG
--
1.5.6.3

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/