regulator: mcp16502: add support for suspend
authorAndrei.Stefanescu@microchip.com <Andrei.Stefanescu@microchip.com>
Fri, 14 Dec 2018 08:09:31 +0000 (08:09 +0000)
committerMark Brown <broonie@kernel.org>
Fri, 14 Dec 2018 11:39:58 +0000 (11:39 +0000)
commitfc401cb98a736fa010aeaf863618a904ca70ba2c
treef627b663703e11986d0313265bf006995e767430
parent82b4d99725aedc3de731faa4e23f256fbe2821cf
regulator: mcp16502: add support for suspend

This patch adds support for entering/resuming suspend states.
It does this by setting the LPM pin of the PMIC.

When suspending the PMIC will enter the Low-power mode
when the LPM pin will be set to high. If the suspend target state
is suspend-to-mem, the PMIC will transition to Hibernate mode,
otherwise, if it is standby, it will remain in Low-power mode.

Signed-off-by: Andrei Stefanescu <andrei.stefanescu@microchip.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/regulator/mcp16502.c