diff options
| author | Laxman Dewangan <ldewangan@nvidia.com> | 2013-04-18 18:32:48 +0530 | 
|---|---|---|
| committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2013-04-18 18:23:53 +0100 | 
| commit | 51d3a0c999e18a802a654171b5e05952b4630148 (patch) | |
| tree | 4ddc1594d7f4d132d40b6e3adf62892ba01eb2cc /lib/mpi/mpi-inline.h | |
| parent | 28d1e8cd671a53d6b4f967abbbc2a55f7bd333f6 (diff) | |
regulator: palmas: preserve modes of rails during enable/disable
The Palma device like TPS65913 have the mode mask which is also
used for enable/disable the rails. The mode bits are defined as
	00: OFF
	01: AUTO
	10: ECO
	11: Forced PWM
and modes are set accordingly as
	REGULATOR_MODE_NORMAL: AUTO
	REGULATOR_MODE_IDLE: ECO
	REGULATOR_MODE_FAST: PWM
Two issue observed:
1. If client calls following sequence:
	regulator_enable(),
	regulator_set_mode(FAST),
	regulator_disable()
	and again the regulator_enable() then the mode is reset
	to NORMAL inplace of keeping the mode as FAST.
	Fixing this by storing the current mode configured by client
	and restoring modes when enable() is called after disable().
2. In following sequence, the regulator get enabled:
	regulator_disable()
	regulator_set_mode(FAST),
	Fixing this by updating new mode in register only if it is
	enabled.
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Acked-by: Graeme Gregory <gg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'lib/mpi/mpi-inline.h')
0 files changed, 0 insertions, 0 deletions
