summaryrefslogtreecommitdiff
path: root/drivers/regulator/core.c
diff options
context:
space:
mode:
authorStephen Boyd <sboyd@codeaurora.org>2015-06-11 17:37:03 -0700
committerMark Brown <broonie@kernel.org>2015-06-12 13:05:11 +0100
commit22a10bca280073f81e9e2d9fed6f90a3bcf00236 (patch)
tree2952174336d871fbd47996291c811aac64199295 /drivers/regulator/core.c
parentb787f68c36d49bb1d9236f403813641efa74a031 (diff)
downloadlwn-22a10bca280073f81e9e2d9fed6f90a3bcf00236.tar.gz
lwn-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/core.c')
-rw-r--r--drivers/regulator/core.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c
index 443eaab933fc..c8d5e2b05fdf 100644
--- a/drivers/regulator/core.c
+++ b/drivers/regulator/core.c
@@ -678,6 +678,8 @@ static int drms_uA_update(struct regulator_dev *rdev)
list_for_each_entry(sibling, &rdev->consumer_list, list)
current_uA += sibling->uA_load;
+ current_uA += rdev->constraints->system_load;
+
if (rdev->desc->ops->set_load) {
/* set the optimum mode for our new total regulator load */
err = rdev->desc->ops->set_load(rdev, current_uA);