]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit516ff16819e31f37972e9ad03b6ac78912dd6e9d
tree9121fb2434cffa9b59d606d0de21ed1399f7f3fb
parent2b0acbe1cff7c576384522491e1690af34e97ea3
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