]> git.baikalelectronics.ru Git - kernel.git/commit
regulator: as3722: Make 0 a valid selector
authorThierry Reding <treding@nvidia.com>
Tue, 3 Jun 2014 15:17:32 +0000 (17:17 +0200)
committerMark Brown <broonie@linaro.org>
Tue, 3 Jun 2014 15:51:19 +0000 (16:51 +0100)
commit1de6277f53315e955ca66066ceb9eddb007c648a
tree4e201b93e1d2a871e9b2b7e64457343d935b7b7e
parent55addf3150ef37e6b38d415547cc6f20b4d9aca1
regulator: as3722: Make 0 a valid selector

As of commit ac090c78b740 (regulator: core: Fix the init of DT defined
fixed regulators) the regulator core tries to query the current voltage
of a regulator when applying constraints. This exposes a bug in the
AS3722 regulator driver which fails to read the voltage of disabled
regulators. The reason is that the hardware is programmed to a selector
of 0, but none of the voltage tables include 0 as a valid selector. The
datasheets indicate that 0 is a valid selector when the regulators are
powered off.

To fix this, add a range including selector 0 to the voltage tables.

Signed-off-by: Thierry Reding <treding@nvidia.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
drivers/regulator/as3722-regulator.c