]> git.baikalelectronics.ru Git - kernel.git/commit
regulator: helpers: Ensure bypass register field matches ON value
authorJon Hunter <jonathanh@nvidia.com>
Thu, 21 Apr 2016 16:12:01 +0000 (17:12 +0100)
committerMark Brown <broonie@kernel.org>
Fri, 22 Apr 2016 10:49:03 +0000 (11:49 +0100)
commitd81197d2792f8b8a35b9d4f495ac11b19fb73b2f
tree5fac10c6f937560bbed4ba353c13704a0a2db313
parent3039f62d3fccb077513a4ffae4d1ef4609c1b724
regulator: helpers: Ensure bypass register field matches ON value

When checking bypass state for a regulator, we check to see if any bits
in the bypass mask are set. For most cases this is fine because there is
typically, only a single bit used to determine if the regulator is in
bypass. However, for some regulators, such as LDO6 on AS3722, the bypass
state is indicate by a value rather than a single bit. Therefore, when
checking the bypass state, check that the bypass field matches the ON
value.

Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/regulator/helpers.c