regulator: bd718x7: Change next state after poweroff to ready
authorMatti Vaittinen <matti.vaittinen@fi.rohmeurope.com>
Wed, 7 Nov 2018 13:41:26 +0000 (15:41 +0200)
committerLeonard Crestez <leonard.crestez@nxp.com>
Wed, 17 Apr 2019 23:51:34 +0000 (02:51 +0300)
commitdea5a34bce29f3f1e00c1be5a1ef3c49c2d6d567
tree5811229dada7e4e41f7317d040b1b8dd20f7af8b
parent6c0abefeb43b83a07f6e6cb3074536bae77acf92
regulator: bd718x7: Change next state after poweroff to ready

BD71837 and BD71847 have a HW functionality which leave power
rails OFF after powerof state:
- if they have been controlled by SW.
- if state transition from poweroff is done to SNVS

BD71837 can after reset transition from power-off to SNVS or
READY state depending on reset reason. By default only wathcdog
reset changes state from poweroff to ready. Change PMIC
configuration to always transition to READY in order to avoid
crucial power rails being OFF after reset.

If SNVS is required the crucial power rails should not be
controlled by SW - eg corresponding regulator control register
should have SEL bit kept zero. Currently the driver assumes all
regulators to be controlled by SW so it sets all SEL bits to 1.

Signed-off-by: Matti Vaittinen <matti.vaittinen@fi.rohmeurope.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
(cherry picked from commit e770b18bbbaecebfb37389b45bf82974a17488d7)
drivers/regulator/bd718x7-regulator.c