diff options
author | Laxman Dewangan <ldewangan@nvidia.com> | 2013-09-17 20:05:18 +0530 |
---|---|---|
committer | Dan Willemsen <dwillemsen@nvidia.com> | 2013-09-26 19:46:10 -0700 |
commit | 4e1abc0e99352ea5b6e44a384a62d18732fb04e8 (patch) | |
tree | 6c68cbfc87ff08edc45171d1780b5c6da1b77ed9 /drivers/regulator | |
parent | 3bd66f93c23e3c1ec6eaf45c56d008f012960f0d (diff) |
regulator: of: add init-microvolt property
Add DT property regulator-init-microvolt to pass the
initial voltage setting of the rail.
Change-Id: I38573973cd70850c70a4e43d4a34817fefe2313b
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: http://git-master/r/275793
Diffstat (limited to 'drivers/regulator')
-rw-r--r-- | drivers/regulator/of_regulator.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/regulator/of_regulator.c b/drivers/regulator/of_regulator.c index 66ca769287ab..3695d7233feb 100644 --- a/drivers/regulator/of_regulator.c +++ b/drivers/regulator/of_regulator.c @@ -21,6 +21,7 @@ static void of_get_regulation_constraints(struct device_node *np, { const __be32 *min_uV, *max_uV, *uV_offset; const __be32 *min_uA, *max_uA, *ramp_delay; + const __be32 *init_uV; struct regulation_constraints *constraints = &(*init_data)->constraints; constraints->name = of_get_property(np, "regulator-name", NULL); @@ -31,6 +32,9 @@ static void of_get_regulation_constraints(struct device_node *np, max_uV = of_get_property(np, "regulator-max-microvolt", NULL); if (max_uV) constraints->max_uV = be32_to_cpu(*max_uV); + init_uV = of_get_property(np, "regulator-init-microvolt", NULL); + if (init_uV) + constraints->init_uV = be32_to_cpu(*init_uV); /* Voltage change possible? */ if (constraints->min_uV != constraints->max_uV) |