Linux ARM-MSM sub-architecture
 help / color / mirror / Atom feed
* [PATCH v2] regulator: qcom-rpmh: Add support for regulator-off-on-delay-us
@ 2026-01-27 17:37 Saikiran
  2026-01-28 10:29 ` Konrad Dybcio
  0 siblings, 1 reply; 7+ messages in thread
From: Saikiran @ 2026-01-27 17:37 UTC (permalink / raw)
  To: broonie, lgirdwood
  Cc: andersson, konrad.dybcio, linux-arm-msm, linux-kernel, Saikiran

The core regulator framework supports enforcing a physical off-time via
standard properties, but the `qcom-rpmh-regulator` driver currently ignores
them. This prevents boards with slow-discharging rails from enforcing safe
power-cycling constraints.

On the Lenovo Yoga Slim 7x (Snapdragon X Elite), certain camera regulators
rely on passive discharge and require a significant off-time to drop below
brownout thresholds. Without this driver support, we cannot enforce this
constraint via Device Tree, leading to sensor initialization failures during
rapid power cycling.

Add support for parsing the `regulator-off-on-delay-us` property from
the device tree.

I have tested this on the Yoga Slim 7x. When the delay property is present
in the device tree, the regulator core correctly blocks re-enable calls
until the delay passes, fixing the camera brownout issues.

Signed-off-by: Saikiran <bjsaikiran@gmail.com>
---
 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


^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2026-01-28 14:04 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-01-27 17:37 [PATCH v2] regulator: qcom-rpmh: Add support for regulator-off-on-delay-us Saikiran
2026-01-28 10:29 ` Konrad Dybcio
2026-01-28 11:34   ` Saikiran B
2026-01-28 11:42     ` Konrad Dybcio
2026-01-28 11:55     ` Mark Brown
2026-01-28 13:59       ` Saikiran B
2026-01-28 14:04         ` Mark Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox