summaryrefslogtreecommitdiffstats
path: root/drivers/regulator/of_regulator.c
diff options
context:
space:
mode:
authorStephen Boyd2015-06-12 02:37:03 +0200
committerMark Brown2015-06-12 14:05:11 +0200
commit22a10bca280073f81e9e2d9fed6f90a3bcf00236 (patch)
tree2952174336d871fbd47996291c811aac64199295 /drivers/regulator/of_regulator.c
parentLinux 4.1-rc1 (diff)
downloadkernel-qcow2-linux-22a10bca280073f81e9e2d9fed6f90a3bcf00236.tar.gz
kernel-qcow2-linux-22a10bca280073f81e9e2d9fed6f90a3bcf00236.tar.xz
kernel-qcow2-linux-22a10bca280073f81e9e2d9fed6f90a3bcf00236.zip
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: