mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jiale Yao <yaojiale02@163.com>
To: Liam Girdwood <lgirdwood@gmail.com>,
	Mark Brown <broonie@kernel.org>,
	patches@opensource.cirrus.com, linux-kernel@vger.kernel.org
Cc: stable@vger.kernel.org
Subject: [PATCH] regulator: arizona-micsupp: freeze charge-pump state work
Date: Wed, 28 Oct 2026 12:50:01 +0800	[thread overview]
Message-ID: <20261028045001.99474-1-yaojiale02@163.com> (raw)

The charge-pump state worker accesses the device through regmap and then
updates DAPM state. It is currently queued on system_wq, so it can run
after the backing bus has suspended.

Queue the worker on system_freezable_wq so hardware access is deferred
until devices have resumed.

Fixes: e6ed90581bfa ("regulator: arizona-micsupp: Enable SYSCLK for charge pump")
Cc: stable@vger.kernel.org
Signed-off-by: Jiale Yao <yaojiale02@163.com>
---
 drivers/regulator/arizona-micsupp.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/regulator/arizona-micsupp.c b/drivers/regulator/arizona-micsupp.c
index be7208bc7409..ae99173b8236 100644
--- a/drivers/regulator/arizona-micsupp.c
+++ b/drivers/regulator/arizona-micsupp.c
@@ -78,7 +78,7 @@ static int arizona_micsupp_enable(struct regulator_dev *rdev)
 	ret = regulator_enable_regmap(rdev);
 
 	if (ret == 0)
-		schedule_work(&micsupp->check_cp_work);
+		queue_work(system_freezable_wq, &micsupp->check_cp_work);
 
 	return ret;
 }
@@ -90,7 +90,7 @@ static int arizona_micsupp_disable(struct regulator_dev *rdev)
 
 	ret = regulator_disable_regmap(rdev);
 	if (ret == 0)
-		schedule_work(&micsupp->check_cp_work);
+		queue_work(system_freezable_wq, &micsupp->check_cp_work);
 
 	return ret;
 }
@@ -102,7 +102,7 @@ static int arizona_micsupp_set_bypass(struct regulator_dev *rdev, bool ena)
 
 	ret = regulator_set_bypass_regmap(rdev, ena);
 	if (ret == 0)
-		schedule_work(&micsupp->check_cp_work);
+		queue_work(system_freezable_wq, &micsupp->check_cp_work);
 
 	return ret;
 }
-- 
2.34.1


             reply	other threads:[~2026-10-28  4:50 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-28  4:50 Jiale Yao [this message]
2026-10-28 14:38 ` Charles Keepax

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20261028045001.99474-1-yaojiale02@163.com \
    --to=yaojiale02@163.com \
    --cc=broonie@kernel.org \
    --cc=lgirdwood@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=patches@opensource.cirrus.com \
    --cc=stable@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®