[PATCH 2/3] regulator: pfuze100: add set_suspend_disable for LDO ops

Joy Zou joy.zou at oss.nxp.com
Wed Jul 15 20:50:54 PDT 2026


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 at oss.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




More information about the linux-arm-kernel mailing list