From: phucduc.bui@gmail.com
To: broonie@kernel.org
Cc: codekipper@gmail.com, jernej.skrabec@gmail.com,
lgirdwood@gmail.com, linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org, linux-sound@vger.kernel.org,
linux-sunxi@lists.linux.dev, nichen@iscas.ac.cn, perex@perex.cz,
samuel@sholland.org, tiwai@suse.com, wens@kernel.org,
bui duc phuc <phucduc.bui@gmail.com>
Subject: [PATCH v2 3/3] ASoC: sunxi: sun4i-spdif: Reorder clock enable sequence
Date: Fri, 22 May 2026 16:54:01 +0700 [thread overview]
Message-ID: <20260522095401.72915-4-phucduc.bui@gmail.com> (raw)
In-Reply-To: <20260522095401.72915-1-phucduc.bui@gmail.com>
From: bui duc phuc <phucduc.bui@gmail.com>
Enable the APB bus clock before the SPDIF module clock
during runtime resume, as register accesses depend on the
bus clock being enabled first.
Signed-off-by: bui duc phuc <phucduc.bui@gmail.com>
---
sound/soc/sunxi/sun4i-spdif.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/sound/soc/sunxi/sun4i-spdif.c b/sound/soc/sunxi/sun4i-spdif.c
index f54eb14c9ed8..102db1a2afbb 100644
--- a/sound/soc/sunxi/sun4i-spdif.c
+++ b/sound/soc/sunxi/sun4i-spdif.c
@@ -643,15 +643,15 @@ static int sun4i_spdif_runtime_suspend(struct device *dev)
static int sun4i_spdif_runtime_resume(struct device *dev)
{
- struct sun4i_spdif_dev *host = dev_get_drvdata(dev);
+ struct sun4i_spdif_dev *host = dev_get_drvdata(dev);
int ret;
- ret = clk_prepare_enable(host->spdif_clk);
+ ret = clk_prepare_enable(host->apb_clk);
if (ret)
return ret;
- ret = clk_prepare_enable(host->apb_clk);
+ ret = clk_prepare_enable(host->spdif_clk);
if (ret)
- clk_disable_unprepare(host->spdif_clk);
+ clk_disable_unprepare(host->apb_clk);
return ret;
}
--
2.43.0
next prev parent reply other threads:[~2026-05-22 9:54 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-22 9:53 [PATCH v2 0/3] ASoC: sunxi: sun4i-spdif: Cleanup and runtime PM improvements phucduc.bui
2026-05-22 9:53 ` [PATCH v2 1/3] ASoC: sunxi: sun4i-spdif: Use guard() for spin locks phucduc.bui
2026-05-22 9:54 ` [PATCH v2 2/3] ASoC: sunxi: sun4i-spdif: Resume device before kcontrol register access phucduc.bui
2026-05-22 19:19 ` Chen-Yu Tsai
2026-05-22 9:54 ` phucduc.bui [this message]
2026-05-22 19:20 ` [PATCH v2 3/3] ASoC: sunxi: sun4i-spdif: Reorder clock enable sequence Chen-Yu Tsai
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=20260522095401.72915-4-phucduc.bui@gmail.com \
--to=phucduc.bui@gmail.com \
--cc=broonie@kernel.org \
--cc=codekipper@gmail.com \
--cc=jernej.skrabec@gmail.com \
--cc=lgirdwood@gmail.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-sound@vger.kernel.org \
--cc=linux-sunxi@lists.linux.dev \
--cc=nichen@iscas.ac.cn \
--cc=perex@perex.cz \
--cc=samuel@sholland.org \
--cc=tiwai@suse.com \
--cc=wens@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