regulator: pfuze100: Power off support

The pfuze100 has some innovative and creative power off support which
requires some cross tree work to handle; this tag is the regualtor bits
of that work.
-----BEGIN PGP SIGNATURE-----

iQFHBAABCgAxFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAluX3HsTHGJyb29uaWVA
a2VybmVsLm9yZwAKCRAk1otyXVSH0Pr3B/9+1UGTB7kL6cUU7cIYN+qMgRephbbM
A7j/NrxiZH+9ZvK5+oLg5ng1ij13UgpVO+GP5D0lpLdrkYL+ty/i0ednWr1UzMp9
tIvnjEQPHGnjXnrSTB33bqt79IZApPstvqV7n36QwFzy+QrKwpEix8zV1Mmb1aN3
sUdbeWY+DFjcsflCaVnyyj8IP0/x6XglyGd/uzoDc2MUEE9VjCzkxYvCMZhkJQzz
IwZ099zaCiv4qhjauGtABIeAao7zRxEA4pS7IoVsbLc7/FGvXmz2cqLHIydsz6nG
yDETbPdMFo9e/C9Bg0iFw3k4gVey6Y+H55T+GyicUBbxfjONWNlncWu0
=CjtL
-----END PGP SIGNATURE-----
regulator: pfuze100-regulator: provide pm_power_off_prepare handler

On some boards the SoC can use one pin "PMIC_STBY_REQ" to notify th PMIC
about state changes. In this case internal state of PMIC must be
preconfigured for upcomming state change.
It works fine with the current regulator framework, except with the
power-off case.

This patch is providing an optional pm_power_off_prepare handler
which will configure standby state of the PMIC to disable all power lines.

In my power consumption test on RIoTBoard, I got the following results:
power off without this patch:	320 mA
power off with this patch:	2   mA
suspend to ram:			40  mA

Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
1 file changed