regulator: twl: Regulator mode should not depend on regulator enabled state
authorIvaylo Dimitrov <ivo.g.dimitrov.75@gmail.com>
Sat, 26 Mar 2016 08:28:15 +0000 (10:28 +0200)
committerMark Brown <broonie@kernel.org>
Mon, 28 Mar 2016 09:39:58 +0000 (10:39 +0100)
commit32e5deac3627a508f43806788dafa933b51d5d46
tree9121fb2434cffa9b59d606d0de21ed1399f7f3fb
parent2330b05c095bdeaaf1261c54cd2d4b9127496996
regulator: twl: Regulator mode should not depend on regulator enabled state

When machine constraints are applied, regulator framework first sets
initial mode (if any) and then enables the regulator if needed. The current
code in twl4030reg_set_mode always checks if the regulator is enabled
before applying the mode. That results in -EACCES error returned for
"always-on" regulators which have "initial-mode" set in the board DTS. Fix
that by removing the unneeded check.

Signed-off-by: Ivaylo Dimitrov <ivo.g.dimitrov.75@gmail.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/regulator/twl-regulator.c
This page took 0.025981 seconds and 5 git commands to generate.