From 9913737d7ce69f3bd68e37e0ad22a9c2c5c50979 Mon Sep 17 00:00:00 2001 From: Laxman Dewangan Date: Thu, 26 Jul 2012 15:21:09 +0530 Subject: 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 Reviewed-on: http://git-master/r/118598 Reviewed-by: Simone Willett Tested-by: Simone Willett --- arch/arm/mach-tegra/dvfs.c | 7 +++++++ 1 file changed, 7 insertions(+) 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", -- cgit v1.2.3