regulator: max77802: set opmode to normal if off is read from hw
authorJavier Martinez Canillas <javier.martinez@collabora.co.uk>
Tue, 26 Aug 2014 11:37:41 +0000 (13:37 +0200)
committerMark Brown <broonie@linaro.org>
Wed, 27 Aug 2014 17:50:56 +0000 (18:50 +0100)
commitaea8dfb9f32bf90dd6fd00758978b50efdc08df5
tree2fe2e21cbd0c2ad5badd09b015c0ecffbf24cc6f
parent29b9c318025bece77d019eada2dee856e3ca50b2
regulator: max77802: set opmode to normal if off is read from hw

The max77802 driver reads the default operating mode (opmode)
set for regulators when enabled from the hardware registers.

But if a regulator is disabled and the system warm restarted,
the hardware reports OFF as the opmode so the regulator is
not enabled. Default to operating mode NORMAL if OFF is read
from the hardware register.

Reported-by: Yuvaraj Cd <yuvaraj.lkml@gmail.com>
Signed-off-by: Javier Martinez Canillas <javier.martinez@collabora.co.uk>
Reviewed-by: Doug Anderson <dianders@chromium.org>
Tested-by: Yuvaraj Kumar CD <yuvaraj.cd@samsung.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
drivers/regulator/max77802.c