* [PATCH v2] ASoC: sunxi: sun50i-dmic: Reorder clock enable sequence
@ 2026-06-02 11:31 phucduc.bui
0 siblings, 0 replies; only message in thread
From: phucduc.bui @ 2026-06-02 11:31 UTC (permalink / raw)
To: Ban Tao, Liam Girdwood, Mark Brown
Cc: Jaroslav Kysela, Takashi Iwai, Chen-Yu Tsai, Jernej Skrabec,
Samuel Holland, linux-sound, linux-arm-kernel, linux-sunxi,
linux-kernel, bui duc phuc
From: bui duc phuc <phucduc.bui@gmail.com>
Reorder the runtime resume clock enable sequence to match the hardware
dependency and ensure symmetry with the suspend path.
The bus clock drives the register interface and must be enabled before
the DMIC module clock. This aligns the resume sequence to be the
exact reverse of the suspend sequence.
Signed-off-by: bui duc phuc <phucduc.bui@gmail.com>
---
NOTE: This patch is compile-tested only.
Changes in v2:
- Clarify in the commit message that the resume sequence becomes the
reverse of the suspend sequence.
sound/soc/sunxi/sun50i-dmic.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/sound/soc/sunxi/sun50i-dmic.c b/sound/soc/sunxi/sun50i-dmic.c
index eddfebe16616..7aff1afdf265 100644
--- a/sound/soc/sunxi/sun50i-dmic.c
+++ b/sound/soc/sunxi/sun50i-dmic.c
@@ -323,16 +323,16 @@ static int sun50i_dmic_runtime_suspend(struct device *dev)
static int sun50i_dmic_runtime_resume(struct device *dev)
{
- struct sun50i_dmic_dev *host = dev_get_drvdata(dev);
+ struct sun50i_dmic_dev *host = dev_get_drvdata(dev);
int ret;
- ret = clk_prepare_enable(host->dmic_clk);
+ ret = clk_prepare_enable(host->bus_clk);
if (ret)
return ret;
- ret = clk_prepare_enable(host->bus_clk);
+ ret = clk_prepare_enable(host->dmic_clk);
if (ret) {
- clk_disable_unprepare(host->dmic_clk);
+ clk_disable_unprepare(host->bus_clk);
return ret;
}
--
2.43.0
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2026-06-02 11:32 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-06-02 11:31 [PATCH v2] ASoC: sunxi: sun50i-dmic: Reorder clock enable sequence phucduc.bui
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox