feat(st-regulator): add enable ramp-delay
Permit to override enable ramp-delay value from
the device tree in BL2.
Change-Id: Id8e803b368055a50fbd14d4527917c449b958ad9
Signed-off-by: Pascal Paillet <p.paillet@st.com>
Signed-off-by: Maxime Méré <maxime.mere@foss.st.com>
diff --git a/drivers/st/regulator/regulator_core.c b/drivers/st/regulator/regulator_core.c
index 2a5d0f7..0b11e53 100644
--- a/drivers/st/regulator/regulator_core.c
+++ b/drivers/st/regulator/regulator_core.c
@@ -420,6 +420,7 @@
static int parse_properties(const void *fdt, struct rdev *rdev, int node)
{
+ const fdt32_t *cuint;
int ret;
if (fdt_getprop(fdt, node, "regulator-always-on", NULL) != NULL) {
@@ -430,6 +431,13 @@
}
}
+ cuint = fdt_getprop(fdt, node, "regulator-enable-ramp-delay", NULL);
+ if (cuint != NULL) {
+ rdev->enable_ramp_delay = fdt32_to_cpu(*cuint);
+ VERBOSE("%s: enable_ramp_delay=%u\n", rdev->desc->node_name,
+ rdev->enable_ramp_delay);
+ }
+
return 0;
}