From: phucduc.bui@gmail.com
To: Mark Brown <broonie@kernel.org>, Shengjiu Wang <shengjiu.wang@nxp.com>
Cc: Liam Girdwood <lgirdwood@gmail.com>,
Jaroslav Kysela <perex@perex.cz>, Takashi Iwai <tiwai@suse.com>,
Kees Cook <kees+treewide@kernel.org>,
Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>,
linux-sound@vger.kernel.org, linux-kernel@vger.kernel.org,
bui duc phuc <phucduc.bui@gmail.com>
Subject: [PATCH 2/2] ASoC: codecs: ak5558: Use devm_pm_runtime_enable()
Date: Fri, 4 Dec 2026 18:26:26 +0700 [thread overview]
Message-ID: <20261204112626.63927-3-phucduc.bui@gmail.com> (raw)
In-Reply-To: <20261204112626.63927-1-phucduc.bui@gmail.com>
From: bui duc phuc <phucduc.bui@gmail.com>
Replace pm_runtime_enable() with devm_pm_runtime_enable()
and remove the redundant remove callback.
Signed-off-by: bui duc phuc <phucduc.bui@gmail.com>
---
sound/soc/codecs/ak5558.c | 14 +++++---------
1 file changed, 5 insertions(+), 9 deletions(-)
diff --git a/sound/soc/codecs/ak5558.c b/sound/soc/codecs/ak5558.c
index f4b3cb6f3c00..9cebcaf8b74c 100644
--- a/sound/soc/codecs/ak5558.c
+++ b/sound/soc/codecs/ak5558.c
@@ -465,6 +465,11 @@ static int ak5558_i2c_probe(struct i2c_client *i2c)
return ret;
}
+ ret = devm_pm_runtime_enable(&i2c->dev);
+ if (ret)
+ return ret;
+ regcache_cache_only(ak5558->regmap, true);
+
dev_id = (uintptr_t)of_device_get_match_data(&i2c->dev);
switch (dev_id) {
case AK5552:
@@ -486,17 +491,9 @@ static int ak5558_i2c_probe(struct i2c_client *i2c)
return ret;
}
- pm_runtime_enable(&i2c->dev);
- regcache_cache_only(ak5558->regmap, true);
-
return 0;
}
-static void ak5558_i2c_remove(struct i2c_client *i2c)
-{
- pm_runtime_disable(&i2c->dev);
-}
-
static const struct of_device_id ak5558_i2c_dt_ids[] __maybe_unused = {
{ .compatible = "asahi-kasei,ak5558", .data = (void *) AK5558 },
{ .compatible = "asahi-kasei,ak5552", .data = (void *) AK5552 },
@@ -511,7 +508,6 @@ static struct i2c_driver ak5558_i2c_driver = {
.pm = pm_ptr(&ak5558_pm),
},
.probe = ak5558_i2c_probe,
- .remove = ak5558_i2c_remove,
};
module_i2c_driver(ak5558_i2c_driver);
--
2.43.0
prev parent reply other threads:[~2026-12-04 11:27 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-12-04 11:26 [PATCH 0/2] ASoC: codecs: ak4xxx: Use devm_pm_runtime_enable() phucduc.bui
2026-12-04 11:26 ` [PATCH 1/2] ASoC: codecs: ak4458: " phucduc.bui
2026-12-04 11:26 ` phucduc.bui [this message]
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=20261204112626.63927-3-phucduc.bui@gmail.com \
--to=phucduc.bui@gmail.com \
--cc=broonie@kernel.org \
--cc=kees+treewide@kernel.org \
--cc=kuninori.morimoto.gx@renesas.com \
--cc=lgirdwood@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-sound@vger.kernel.org \
--cc=perex@perex.cz \
--cc=shengjiu.wang@nxp.com \
--cc=tiwai@suse.com \
/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