summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorEnrico Jorns <ejo@pengutronix.de>2022-01-03 12:57:18 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2022-01-05 08:28:37 +0100
commit9f542bd7394888fe5e70fe72c377cc095771d460 (patch)
treedf19224f5e1076b111b479172d8e1ecd80cf77b4 /include
parente81f07eb19e573a4cdfbdb0d9588712c89a41e2c (diff)
downloadbarebox-9f542bd7394888fe5e70fe72c377cc095771d460.tar.gz
barebox-9f542bd7394888fe5e70fe72c377cc095771d460.tar.xz
regulator: respect "regulator-always-on" property
As barebox ignored this property, a regulator could have been disabled even if it should not have been. By taking the same path as for 'regulator-boot-on', we ensure always holding an enable count > 0 on the regulator. Signed-off-by: Enrico Jorns <ejo@pengutronix.de> Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Link: https://lore.barebox.org/20220103115718.1723730-6-a.fatoum@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'include')
-rw-r--r--include/regulator.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/include/regulator.h b/include/regulator.h
index bbe8dd91d8..dfdfbf0332 100644
--- a/include/regulator.h
+++ b/include/regulator.h
@@ -84,7 +84,8 @@ struct regulator_desc {
struct regulator_dev {
const struct regulator_desc *desc;
struct regmap *regmap;
- int boot_on;
+ bool boot_on;
+ bool always_on;
/* the device this regulator device belongs to */
struct device_d *dev;
};