summaryrefslogtreecommitdiffstats
path: root/drivers/regulator/max77802-regulator.c
diff options
context:
space:
mode:
authorDouglas Anderson <dianders@chromium.org>2018-11-26 18:08:27 +0100
committerMark Brown <broonie@kernel.org>2018-11-26 18:09:40 +0100
commitfa94e48e13a1aaf814b9e956d8e5a52ef303b569 (patch)
tree50d012d6ce44b2147825ab9480286dee14748ed8 /drivers/regulator/max77802-regulator.c
parentspi: spi-qcom-qspi: Fix remaining driver nits (diff)
downloadlinux-fa94e48e13a1aaf814b9e956d8e5a52ef303b569.tar.xz
linux-fa94e48e13a1aaf814b9e956d8e5a52ef303b569.zip
regulator: core: Apply system load even if no consumer loads
Prior to commit 5451781dadf8 ("regulator: core: Only count load for enabled consumers") we used to always add up the total load on every enable in _regulator_enable(). After that commit we only updated the total load when enabling / disabling a regulator where a consumer specified a load or when changing the consumer load on an enabled regulator. The problem with the new scheme is that if there is a system load specified for a regulator but no consumers specify a load then we never account for it. Let's account for the system load in set_machine_constraints(). NOTE: with the new scheme we end up with a bit of a quandry. What if someone specifies _both_ an initial mode and a system load? If we take the system load into account right at init time then it will effectively clobber the initial mode. We'll resolve this by saying that if both are specified then the initial mode will win. The system load will then only take effect if/when a consumer specifies a load. If no consumers ever specify a load then the initial mode will persist and the system load will have no effect. Fixes: 5451781dadf8 ("regulator: core: Only count load for enabled consumers") Reported-by: Brian Masney <masneyb@onstation.org> Signed-off-by: Douglas Anderson <dianders@chromium.org> Tested-by: Brian Masney <masneyb@onstation.org> Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'drivers/regulator/max77802-regulator.c')
0 files changed, 0 insertions, 0 deletions