[PATCH] regulator: qcom-rpmh: Add support for regulator-off-on-delay-us

From: Saikiran

Date: Tue Jan 27 2026 - 12:28:15 EST


Some Qualcomm platforms require a significant delay after powering off a
rail before it can be powered on again, especially for regulators that
depend on passive discharge.

The core regulator framework supports this via the 'regulator-off-on-delay-us'
property, but the RPMh regulator driver currently ignores it.

Add support for parsing this generic property from device tree and
populating the regulator descriptor. This allows board-specific DTS files
to specify required discharge delays for RPMh-controlled regulators.

Tested-on: Lenovo Yoga Slim 7x (Snapdragon X Elite)
Signed-off-by: Saikiran <bjsaikiran@xxxxxxxxx>
---
drivers/regulator/qcom-rpmh-regulator.c | 3 +++
1 file changed, 3 insertions(+)

diff --git a/drivers/regulator/qcom-rpmh-regulator.c b/drivers/regulator/qcom-rpmh-regulator.c
index 6e4cb2871fca..aafba61551b3 100644
--- a/drivers/regulator/qcom-rpmh-regulator.c
+++ b/drivers/regulator/qcom-rpmh-regulator.c
@@ -503,6 +503,9 @@ static int rpmh_regulator_init_vreg(struct rpmh_vreg *vreg, struct device *dev,
vreg->always_wait_for_ack = of_property_read_bool(node,
"qcom,always-wait-for-ack");

+ of_property_read_u32(node, "regulator-off-on-delay-us",
+ &vreg->rdesc.off_on_delay);
+
vreg->rdesc.owner = THIS_MODULE;
vreg->rdesc.type = REGULATOR_VOLTAGE;
vreg->rdesc.ops = vreg->hw_data->ops;
--
2.51.0