summaryrefslogtreecommitdiff
path: root/arch/arm/mach-tegra/dvfs.c
diff options
context:
space:
mode:
authorLaxman Dewangan <ldewangan@nvidia.com>2012-07-26 15:21:09 +0530
committerSimone Willett <swillett@nvidia.com>2012-07-30 21:10:53 -0700
commit9913737d7ce69f3bd68e37e0ad22a9c2c5c50979 (patch)
tree2684956b83d42410b6042c391befbd6bfb1485c3 /arch/arm/mach-tegra/dvfs.c
parent9c74bdcc6e4e0ac478f4766461ed4ed87f8ba07d (diff)
ARM: tegra: dvfs: enable regulator before using it
The dvfs system require the regulator for regulating the voltage. The regulator should be enable before using it to make sure the reference count enabling rail of that rail should be properly counted. Change-Id: Ib8b673ecb7939ac80f46bdf90ffec27b8f62df6b Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Reviewed-on: http://git-master/r/118598 Reviewed-by: Simone Willett <swillett@nvidia.com> Tested-by: Simone Willett <swillett@nvidia.com>
Diffstat (limited to 'arch/arm/mach-tegra/dvfs.c')
-rw-r--r--arch/arm/mach-tegra/dvfs.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/arch/arm/mach-tegra/dvfs.c b/arch/arm/mach-tegra/dvfs.c
index 43f42cdf527d..c36b81d2c402 100644
--- a/arch/arm/mach-tegra/dvfs.c
+++ b/arch/arm/mach-tegra/dvfs.c
@@ -309,6 +309,13 @@ static int dvfs_rail_connect_to_regulator(struct dvfs_rail *rail)
rail->reg = reg;
}
+ v = regulator_enable(rail->reg);
+ if (v < 0) {
+ pr_err("tegra_dvfs: failed on enabling regulator %s\n, err %d",
+ rail->reg_id, v);
+ return v;
+ }
+
v = regulator_get_voltage(rail->reg);
if (v < 0) {
pr_err("tegra_dvfs: failed initial get %s voltage\n",