From: Fabio Estevam <festevam@gmail.com>
To: broonie@kernel.org
Cc: shengjiu.wang@gmail.com, linux-sound@vger.kernel.org,
Fabio Estevam <festevam@gmail.com>
Subject: [PATCH 3/3] ASoC: fsl_sai: Select sleep pinctrl state during runtime suspend
Date: Mon, 19 Oct 2026 19:28:27 -0300 [thread overview]
Message-ID: <20261019222827.131120-3-festevam@gmail.com> (raw)
In-Reply-To: <20261019222827.131120-1-festevam@gmail.com>
When runtime suspended, the SAI can leave its outputs at their last
levels. If a connected device is unpowered, those signals can source
current through its input protection circuitry.
Select the sleep pinctrl state after gating the clocks, and restore the
default state before enabling them on runtime resume. Devices without
a sleep state continue to use their existing pin configuration.
The pin-state issue was reproduced on a custom i.MX8MP board.
Signed-off-by: Fabio Estevam <festevam@gmail.com>
---
sound/soc/fsl/fsl_sai.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/sound/soc/fsl/fsl_sai.c b/sound/soc/fsl/fsl_sai.c
index a135b3da37cf..ad21bd3b8a5d 100644
--- a/sound/soc/fsl/fsl_sai.c
+++ b/sound/soc/fsl/fsl_sai.c
@@ -1959,6 +1959,7 @@ static int fsl_sai_runtime_suspend(struct device *dev)
cpu_latency_qos_remove_request(&sai->pm_qos_req);
regcache_cache_only(sai->regmap, true);
+ pinctrl_pm_select_sleep_state(dev);
return 0;
}
@@ -1969,6 +1970,8 @@ static int fsl_sai_runtime_resume(struct device *dev)
unsigned int ofs = sai->soc_data->reg_offset;
int ret;
+ pinctrl_pm_select_default_state(dev);
+
ret = clk_prepare_enable(sai->bus_clk);
if (ret) {
dev_err(dev, "failed to enable bus clock: %d\n", ret);
--
2.43.0
prev parent reply other threads:[~2026-10-19 22:29 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-19 22:28 [PATCH 1/3] ASoC: fsl_sai: Defer TERE until stream setup Fabio Estevam
2026-10-19 22:28 ` [PATCH 2/3] ASoC: fsl_sai: Stop BCLK after the last stream is freed Fabio Estevam
2026-10-19 22:28 ` Fabio Estevam [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=20261019222827.131120-3-festevam@gmail.com \
--to=festevam@gmail.com \
--cc=broonie@kernel.org \
--cc=linux-sound@vger.kernel.org \
--cc=shengjiu.wang@gmail.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.