]> asedeno.scripts.mit.edu Git - linux.git/commit
regulator: pfuze100-regulator: provide pm_power_off_prepare handler
authorOleksij Rempel <o.rempel@pengutronix.de>
Thu, 2 Aug 2018 10:34:24 +0000 (12:34 +0200)
committerMark Brown <broonie@kernel.org>
Tue, 11 Sep 2018 15:15:57 +0000 (16:15 +0100)
commitc29daffa322ad36978cbce487f8ebcd9c3c3f7c0
treea6bbe144e4ff55acc050f565380b64d324ac065f
parentcb60ad04c4eb69bc73025546172856e4de36b13e
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>
drivers/regulator/pfuze100-regulator.c