summaryrefslogtreecommitdiff
path: root/include/power/regulator.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/power/regulator.h')
-rw-r--r--include/power/regulator.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/include/power/regulator.h b/include/power/regulator.h
index 5318ab3ace..314160a894 100644
--- a/include/power/regulator.h
+++ b/include/power/regulator.h
@@ -304,6 +304,17 @@ int regulator_get_enable(struct udevice *dev);
int regulator_set_enable(struct udevice *dev, bool enable);
/**
+ * regulator_set_enable_if_allowed: set regulator enable state if allowed by
+ * regulator
+ *
+ * @dev - pointer to the regulator device
+ * @enable - set true or false
+ * @return - 0 on success or if enabling is not supported
+ * -errno val if fails.
+ */
+int regulator_set_enable_if_allowed(struct udevice *dev, bool enable);
+
+/**
* regulator_get_mode: get active operation mode id of a given regulator
*
* @dev - pointer to the regulator device