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

From: jiale yao

Date: Tue Oct 27 2026 - 02:27:47 EST


At 2026-10-24 01:36:05, "Mark Brown" <broonie@xxxxxxxxxx> wrote:
>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.

Thanks for your review, this is updated version,
https://lore.kernel.org/all/20261027062007.2226548-1-yaojiale02@xxxxxxx/