From: Frank Li <Frank.li@oss.nxp.com>
To: Joy Zou <joy.zou@oss.nxp.com>
Cc: Liam Girdwood <lgirdwood@gmail.com>,
Mark Brown <broonie@kernel.org>, Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>, Frank Li <Frank.Li@nxp.com>,
Sascha Hauer <s.hauer@pengutronix.de>,
Pengutronix Kernel Team <kernel@pengutronix.de>,
Fabio Estevam <festevam@gmail.com>, Ye Li <ye.li@nxp.com>,
Jacky Bai <ping.bai@nxp.com>, Peng Fan <peng.fan@nxp.com>,
Dong Aisheng <aisheng.dong@nxp.com>,
linux-kernel@vger.kernel.org, devicetree@vger.kernel.org,
imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH 2/3] regulator: pfuze100: add set_suspend_disable for LDO ops
Date: Thu, 16 Jul 2026 09:28:22 -0500 [thread overview]
Message-ID: <aljqhhhkeqayQ_z7@SMW015318> (raw)
In-Reply-To: <20260716-b4-regulator-pf01-v1-2-8c1519d54bd4@oss.nxp.com>
On Thu, Jul 16, 2026 at 11:50:54AM +0800, Joy Zou wrote:
> Add set_suspend_disable callback to pfuze100_ldo_regulator_ops to
> support regulator-off-in-suspend DTS property for VGEN regulators.
> This allows unused LDO regulators to be properly disabled during
> system suspend, reducing power consumption.
>
> Signed-off-by: Joy Zou <joy.zou@oss.nxp.com>
> ---
Reviewed-by: Frank Li <Frank.Li@nxp.com>
> drivers/regulator/pfuze100-regulator.c | 17 +++++++++++++++++
> 1 file changed, 17 insertions(+)
>
> diff --git a/drivers/regulator/pfuze100-regulator.c b/drivers/regulator/pfuze100-regulator.c
> index 7d56c22b5e40..e6d3a28baadc 100644
> --- a/drivers/regulator/pfuze100-regulator.c
> +++ b/drivers/regulator/pfuze100-regulator.c
> @@ -158,6 +158,22 @@ static int pfuze100_set_ramp_delay(struct regulator_dev *rdev, int ramp_delay)
> return ret;
> }
>
> +static int pfuze100_set_suspend_disable(struct regulator_dev *rdev)
> +{
> + struct pfuze_chip *pfuze100 = rdev_get_drvdata(rdev);
> + int id = rdev_get_id(rdev);
> +
> + /*
> + * Set VGENxSTBY and clear VGENxLPWR so that the LDO output is
> + * disabled when the PMIC receives a STANDBY event.
> + * EN=1, LPWR=0, STBY=1 results in output Off when STANDBY is asserted.
> + */
> + return regmap_update_bits(pfuze100->regmap,
> + pfuze100->regulator_descs[id].stby_reg,
> + PFUZE100_VGENxSTBY | PFUZE100_VGENxLPWR,
> + PFUZE100_VGENxSTBY);
> +}
> +
> static const struct regulator_ops pfuze100_ldo_regulator_ops = {
> .enable = regulator_enable_regmap,
> .disable = regulator_disable_regmap,
> @@ -165,6 +181,7 @@ static const struct regulator_ops pfuze100_ldo_regulator_ops = {
> .list_voltage = regulator_list_voltage_linear,
> .set_voltage_sel = regulator_set_voltage_sel_regmap,
> .get_voltage_sel = regulator_get_voltage_sel_regmap,
> + .set_suspend_disable = pfuze100_set_suspend_disable,
> };
>
> static const struct regulator_ops pfuze100_fixed_regulator_ops = {
>
> --
> 2.34.1
>
>
next prev parent reply other threads:[~2026-07-16 14:28 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-16 3:50 [PATCH 0/3] regulator: handle regulator late cleanup race with PM suspend Joy Zou
2026-07-16 3:50 ` [PATCH 1/3] regulator: core: use system_freezable_wq for init complete work Joy Zou
2026-07-16 14:27 ` Frank Li
2026-07-16 3:50 ` [PATCH 2/3] regulator: pfuze100: add set_suspend_disable for LDO ops Joy Zou
2026-07-16 14:28 ` Frank Li [this message]
2026-07-16 3:50 ` [PATCH 3/3] arm64: dts: imx8mq-evk: add regulator-off-in-suspend for VGEN1/VGEN6 Joy Zou
2026-07-16 14:31 ` Frank Li
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=aljqhhhkeqayQ_z7@SMW015318 \
--to=frank.li@oss.nxp.com \
--cc=Frank.Li@nxp.com \
--cc=aisheng.dong@nxp.com \
--cc=broonie@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=festevam@gmail.com \
--cc=imx@lists.linux.dev \
--cc=joy.zou@oss.nxp.com \
--cc=kernel@pengutronix.de \
--cc=krzk+dt@kernel.org \
--cc=lgirdwood@gmail.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=peng.fan@nxp.com \
--cc=ping.bai@nxp.com \
--cc=robh@kernel.org \
--cc=s.hauer@pengutronix.de \
--cc=ye.li@nxp.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox