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>
This commit is contained in:
Pascal Paillet 2022-02-17 17:20:57 +01:00 committed by Maxime Méré
parent 19bcffad58
commit 6897ae8d0f

View file

@ -420,6 +420,7 @@ int regulator_set_flag(struct rdev *rdev, uint16_t flag)
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 @@ static int parse_properties(const void *fdt, struct rdev *rdev, int node)
}
}
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;
}