summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorMarco Felsch <m.felsch@pengutronix.de>2020-01-29 12:38:23 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2020-02-10 09:42:43 +0100
commitdc71db1369eeb7f383082c9ad38aa682c2a97c00 (patch)
tree71173dfda65d3dd4fd127fe2b62958163c742fa5 /drivers
parent0be4ed979f138294447d4ac39650ff469556af4e (diff)
downloadbarebox-dc71db1369eeb7f383082c9ad38aa682c2a97c00.tar.gz
barebox-dc71db1369eeb7f383082c9ad38aa682c2a97c00.tar.xz
regulator: fixed: take regulator-boot-on into account
There are regulators which are turned on by default (hw-design) and shouldn't be disabled during the boot. Upstream uses the regulator-boot-on dt-property for it: 8<-------------------------------------------------- regulator-boot-on: description: bootloader/firmware enabled regulator type: boolean 8<-------------------------------------------------- The difference between boot-on and always-on is the linux suspend handling. Regulators marked as boot-on can be disabled during suspend. This case isn't interesting for barebox so we can mark those as always-on too. Signed-off-by: Marco Felsch <m.felsch@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/regulator/fixed.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/regulator/fixed.c b/drivers/regulator/fixed.c
index cb5d785817..78b8290ff2 100644
--- a/drivers/regulator/fixed.c
+++ b/drivers/regulator/fixed.c
@@ -86,7 +86,8 @@ static int regulator_fixed_probe(struct device_d *dev)
fix->rdesc.ops = &fixed_ops;
fix->rdev.desc = &fix->rdesc;
- if (of_find_property(dev->device_node, "regulator-always-on", NULL)) {
+ if (of_find_property(dev->device_node, "regulator-always-on", NULL) ||
+ of_find_property(dev->device_node, "regulator-boot-on", NULL)) {
fix->always_on = 1;
regulator_fixed_enable(&fix->rdev);
}