[PATCH v2 0/3] regulator: handle regulator late cleanup race with PM suspend

Joy Zou posted 3 patches 2 months ago
arch/arm64/boot/dts/freescale/imx8mq-evk.dts |  6 ++++++
drivers/regulator/core.c                     |  6 ++++--
drivers/regulator/pfuze100-regulator.c       | 20 ++++++++++++++++++++
3 files changed, 30 insertions(+), 2 deletions(-)
[PATCH v2 0/3] regulator: handle regulator late cleanup race with PM suspend
Posted by Joy Zou 2 months ago
The regulator_init_complete_work fires ~30s after boot to disable
unused regulators via I2C. When this work races with PM suspend, the
I2C adapter may already be suspended, causing a -ESHUTDOWN warning
dump.

This series addresses the race and adds proper suspend power
management for unused LDO regulators.

Signed-off-by: Joy Zou <joy.zou@oss.nxp.com>
---
Changes in v2:
- trim the oversized register dump from the backtrace in the commit
  message, keeping only the relevant call trace.
- rename the callback to pfuze100_ldo_set_suspend_disable since it is
  only wired into the LDO ops.
- use the per-regulator stby_reg/stby_mask instead of a hardcoded
  VGENxSTBY/VGENxLPWR bit.
- clarify that the change targets suspend power reduction and remove the
  redundant race-condition wording so the commit message is clearer.
- Link to v1: https://patch.msgid.link/20260716-b4-regulator-pf01-v1-0-8c1519d54bd4@oss.nxp.com

---
Joy Zou (3):
      regulator: core: use system_freezable_wq for init complete work
      regulator: pfuze100: add set_suspend_disable for LDO ops
      arm64: dts: imx8mq-evk: add regulator-off-in-suspend for VGEN1/VGEN6

 arch/arm64/boot/dts/freescale/imx8mq-evk.dts |  6 ++++++
 drivers/regulator/core.c                     |  6 ++++--
 drivers/regulator/pfuze100-regulator.c       | 20 ++++++++++++++++++++
 3 files changed, 30 insertions(+), 2 deletions(-)
---
base-commit: 34cf6dafc47441dfb6b356a095b89c3585a93714
change-id: 20260716-b4-regulator-pf01-5db03fba4a92

Best regards,
--  
Joy Zou <joy.zou@oss.nxp.com>
Re: (subset) [PATCH v2 0/3] regulator: handle regulator late cleanup race with PM suspend
Posted by Frank.Li@oss.nxp.com 1 month, 3 weeks ago
From: Frank Li <Frank.Li@nxp.com>


On Fri, 31 Jul 2026 18:21:42 +0800, Joy Zou wrote:
> The regulator_init_complete_work fires ~30s after boot to disable
> unused regulators via I2C. When this work races with PM suspend, the
> I2C adapter may already be suspended, causing a -ESHUTDOWN warning
> dump.
>
> This series addresses the race and adds proper suspend power
> management for unused LDO regulators.
>
> [...]

Applied to imx/dt64-indend, thanks!

[3/3] arm64: dts: imx8mq-evk: add regulator-off-in-suspend for VGEN1/VGEN6
      commit: 806ce18b1a6d8c514b174439e7ad462ca88f55d8

Best regards,
--
Frank Li <Frank.Li@nxp.com>
Re: (subset) [PATCH v2 0/3] regulator: handle regulator late cleanup race with PM suspend
Posted by Mark Brown 2 months ago
On Fri, 31 Jul 2026 18:21:42 +0800, Joy Zou wrote:
> regulator: handle regulator late cleanup race with PM suspend
> 
> The regulator_init_complete_work fires ~30s after boot to disable
> unused regulators via I2C. When this work races with PM suspend, the
> I2C adapter may already be suspended, causing a -ESHUTDOWN warning
> dump.
> 
> [...]

Applied to

   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator.git for-7.3

Thanks!

[1/3] regulator: core: use system_freezable_wq for init complete work
      https://git.kernel.org/broonie/regulator/c/03eab318cedd
[2/3] regulator: pfuze100: add set_suspend_disable for LDO ops
      https://git.kernel.org/broonie/regulator/c/7595f50ff822

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark