summaryrefslogtreecommitdiff
path: root/drivers/regulator/of_regulator.c
diff options
context:
space:
mode:
authorStephen Boyd <sboyd@codeaurora.org>2015-06-12 03:37:03 +0300
committerMark Brown <broonie@kernel.org>2015-06-12 15:05:11 +0300
commit22a10bca280073f81e9e2d9fed6f90a3bcf00236 (patch)
tree2952174336d871fbd47996291c811aac64199295 /drivers/regulator/of_regulator.c
parentb787f68c36d49bb1d9236f403813641efa74a031 (diff)
downloadlinux-22a10bca280073f81e9e2d9fed6f90a3bcf00236.tar.xz
regulator: Add system_load constraint
Some regulators have a fixed load that isn't captured by consumers that the kernel knows about. Add a constraint to support this. Signed-off-by: Stephen Boyd <sboyd@codeaurora.org> Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'drivers/regulator/of_regulator.c')
-rw-r--r--drivers/regulator/of_regulator.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/regulator/of_regulator.c b/drivers/regulator/of_regulator.c
index 24e812c48d93..482a86f90839 100644
--- a/drivers/regulator/of_regulator.c
+++ b/drivers/regulator/of_regulator.c
@@ -95,6 +95,9 @@ static void of_get_regulation_constraints(struct device_node *np,
}
}
+ if (!of_property_read_u32(np, "regulator-system-load", &pval))
+ constraints->system_load = pval;
+
for (i = 0; i < ARRAY_SIZE(regulator_states); i++) {
switch (i) {
case PM_SUSPEND_MEM: