[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <663cfee5-ea40-4990-9391-3b12d9279cea@oss.qualcomm.com>
Date: Wed, 28 Jan 2026 11:29:57 +0100
From: Konrad Dybcio <konrad.dybcio@....qualcomm.com>
To: Saikiran <bjsaikiran@...il.com>, broonie@...nel.org, lgirdwood@...il.com
Cc: andersson@...nel.org, konrad.dybcio@...nel.org,
linux-arm-msm@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2] regulator: qcom-rpmh: Add support for
regulator-off-on-delay-us
On 1/27/26 6:37 PM, Saikiran wrote:
> 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@...il.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);
Would it not be a better fit for of_regulator.c?
Konrad
Powered by blists - more mailing lists