Re: [PATCH 1/2] regulator: core: freeze deferred disable work during suspend

From: Mark Brown

Date: Fri Oct 23 2026 - 13:41:11 EST


On Fri, Oct 16, 2026 at 06:05:21PM +0800, Jiale Yao wrote:

> regulator_disable_deferred() schedules hardware access after a
> caller-provided delay. The power-efficient system workqueue remains
> active during system suspend, so deferred regulator operations can reach
> a bus after its controller has been suspended.

> Use the freezable power-efficient workqueue to preserve the existing
> power policy while deferring regulator access until devices have resumed.

This is going to have a fun interaction with the only current user of
deferred disables, DAPM. If a DAPM supply that uses deferred disables
is active at system suspend then it will disable it using a deferred
disable but since the workqueue is frozen quite early on in suspend this
will simply result in the disable not happening until after the suspend
has completed which isn't the desired outcome.

Since if we're suspending it's reasonable to assume that the supply
won't be bounced on again quickly, or that if it is we can reasonably
pay the cost of full ramp up, we should probably arrange for the disable
to be processed immeditely if we're in suspend. In addition if there
are already pending disables it'd make sense to flush them rather than
letting the workqueue freeze, for similar reasons.

Attachment: signature.asc
Description: PGP signature