Re:[PATCH 1/2] regulator: core: freeze deferred disable work during suspend
From: jiale yao
Date: Sat Oct 17 2026 - 03:22:15 EST
At 2026-10-16 18:05:21, "Jiale Yao" <yaojiale02@xxxxxxx> 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.
>
Fixes: da07ecd93b19 ("regulator: Implement deferred disable support")
>Signed-off-by: Jiale Yao <yaojiale02@xxxxxxx>
>---
> drivers/regulator/core.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
>diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c
>index 6a4008f387b5..317f02696e47 100644
>--- a/drivers/regulator/core.c
>+++ b/drivers/regulator/core.c
>@@ -3465,7 +3465,8 @@ int regulator_disable_deferred(struct regulator *regulator, int ms)
>
> regulator_lock(rdev);
> regulator->deferred_disables++;
>- mod_delayed_work(system_power_efficient_wq, &rdev->disable_work,
>+ mod_delayed_work(system_freezable_power_efficient_wq,
>+ &rdev->disable_work,
> msecs_to_jiffies(ms));
> regulator_unlock(rdev);
>
>--
>2.34.1