diff options
author | Stephen Boyd <sboyd@codeaurora.org> | 2015-06-12 03:37:03 +0300 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2015-06-12 15:05:11 +0300 |
commit | 22a10bca280073f81e9e2d9fed6f90a3bcf00236 (patch) | |
tree | 2952174336d871fbd47996291c811aac64199295 /drivers/regulator/core.c | |
parent | b787f68c36d49bb1d9236f403813641efa74a031 (diff) | |
download | linux-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/core.c')
-rw-r--r-- | drivers/regulator/core.c | 2 |
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); |