Re: [PATCH] regulator: pca9450: Support regulator-off-in-suspend
From: Mark Brown
Date: Tue Jul 28 2026 - 15:24:45 EST
On Fri, Jul 24, 2026 at 05:13:22PM -0300, Fabio Estevam wrote:
> The PCA9450 uses each regulator's ENMODE field to control whether the
> regulator remains enabled when the PMIC transitions from RUN to STANDBY
> mode.
> Implement set_suspend_disable() for the buck regulators and LDO3-LDO5
> by programming ENMODE to 10b. This keeps the regulator enabled in RUN
> mode, turns it off when PMIC_STBY_REQ is asserted, and enables it again
> when the PMIC returns to RUN mode.
> +static int pca9450_buck_set_suspend_disable(struct regulator_dev *rdev)
> +{
> + return regmap_update_bits(rdev->regmap, rdev->desc->enable_reg,
> + rdev->desc->enable_mask,
> + BUCK_ENMODE_ONREQ_STBYREQ);
> +}
> +
> +static int pca9450_ldo_set_suspend_disable(struct regulator_dev *rdev)
> +{
> + return regmap_update_bits(rdev->regmap, rdev->desc->enable_reg,
> + rdev->desc->enable_mask,
> + LDO_ENMODE_ONREQ_STBYREQ);
> +}
This is the same register that is used to control runtime enable, I
can't see how the runtime and suspend enable operations avoid corrupting
each other's state?
Attachment:
signature.asc
Description: PGP signature