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>
This commit is contained in:
Stephen Boyd
2015-06-11 17:37:03 -07:00
committed by Mark Brown
parent b787f68c36
commit 22a10bca28
4 changed files with 10 additions and 0 deletions

View File

@@ -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: