regulator: max77686: Store opmode non-shifted
authorKrzysztof Kozlowski <k.kozlowski@samsung.com>
Mon, 27 Oct 2014 12:11:48 +0000 (13:11 +0100)
committerMark Brown <broonie@kernel.org>
Tue, 28 Oct 2014 22:31:59 +0000 (22:31 +0000)
Introduce simple helper for calculating the shift for OPMODE field in
registers. This allows storing the current value of opmode in
non-shifted form and simplifies a little set_suspend_disable and enable
functions. Additionally this will allow adding support LDOs to the
existing set_suspend_disable function.

Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Suggested-by: Javier Martinez Canillas <javier.martinez@collabora.co.uk>
Reviewed-by: Javier Martinez Canillas <javier.martinez@collabora.co.uk>
Signed-off-by: Mark Brown <broonie@kernel.org>

No differences found