From: phucduc.bui@gmail.com
To: Mark Brown <broonie@kernel.org>,
Thierry Reding <thierry.reding@kernel.org>,
Liam Girdwood <lgirdwood@gmail.com>,
Jaroslav Kysela <perex@perex.cz>, Takashi Iwai <tiwai@suse.com>,
Jonathan Hunter <jonathanh@nvidia.com>
Cc: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>,
Sheetal <sheetal@nvidia.com>,
u.kleine-koenig@baylibre.com,
Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>,
Rosen Penev <rosenp@gmail.com>,
Piyush Patle <piyushpatle228@gmail.com>,
Takashi Sakamoto <o-takashi@sakamocchi.jp>,
Bjorn Helgaas <bhelgaas@google.com>,
linux-tegra@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-sound@vger.kernel.org, bui duc phuc <phucduc.bui@gmail.com>
Subject: [PATCH 4/4] ASoC: tegra: tegra210: Use devm_clk_get_optional() for sync_input clock
Date: Wed, 15 Jul 2026 12:11:15 +0700 [thread overview]
Message-ID: <20260715051115.17385-5-phucduc.bui@gmail.com> (raw)
In-Reply-To: <20260715051115.17385-1-phucduc.bui@gmail.com>
From: bui duc phuc <phucduc.bui@gmail.com>
The existing comment states that the sync_input clock is only needed
when another I/O is configured to use the current I2S instance as its
input clock, and the current code does not treat its absence as an
error.
Use devm_clk_get_optional() to match the existing behaviour while still
reporting real failures via dev_err_probe(). Update the comment to
describe the optional nature of the clock rather than the previous error
handling.
Signed-off-by: bui duc phuc <phucduc.bui@gmail.com>
---
sound/soc/tegra/tegra210_i2s.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/sound/soc/tegra/tegra210_i2s.c b/sound/soc/tegra/tegra210_i2s.c
index ff8c72fc38c5..e7e26e917291 100644
--- a/sound/soc/tegra/tegra210_i2s.c
+++ b/sound/soc/tegra/tegra210_i2s.c
@@ -1078,13 +1078,13 @@ static int tegra210_i2s_probe(struct platform_device *pdev)
"can't retrieve I2S bit clock\n");
/*
- * Not an error, as this clock is needed only when some other I/O
- * requires input clock from current I2S instance, which is
- * configurable from DT.
+ * This clock is optional and is only needed when another I/O uses
+ * the current I2S instance as its input clock, as configured in DT.
*/
- i2s->clk_sync_input = devm_clk_get(dev, "sync_input");
+ i2s->clk_sync_input = devm_clk_get_optional(dev, "sync_input");
if (IS_ERR(i2s->clk_sync_input))
- dev_dbg(dev, "can't retrieve I2S sync input clock\n");
+ return dev_err_probe(dev, PTR_ERR(i2s->clk_sync_input),
+ "can't retrieve I2S sync input clock\n");
regs = devm_platform_ioremap_resource(pdev, 0);
if (IS_ERR(regs))
--
2.43.0
prev parent reply other threads:[~2026-07-15 5:12 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-15 5:11 [PATCH 0/4] ASoC: tegra: Simplify error handling phucduc.bui
2026-07-15 5:11 ` [PATCH 1/4] ASoC: tegra: tegra20_das: Use dev_err_probe() for " phucduc.bui
2026-07-15 5:11 ` [PATCH 2/4] ASoC: tegra: tegra210_adx: Return the original error directly phucduc.bui
2026-07-15 5:11 ` [PATCH 3/4] ASoC: tegra: tegra210_amx: " phucduc.bui
2026-07-15 5:11 ` 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=20260715051115.17385-5-phucduc.bui@gmail.com \
--to=phucduc.bui@gmail.com \
--cc=bhelgaas@google.com \
--cc=broonie@kernel.org \
--cc=jonathanh@nvidia.com \
--cc=krzysztof.kozlowski@oss.qualcomm.com \
--cc=kuninori.morimoto.gx@renesas.com \
--cc=lgirdwood@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-sound@vger.kernel.org \
--cc=linux-tegra@vger.kernel.org \
--cc=o-takashi@sakamocchi.jp \
--cc=perex@perex.cz \
--cc=piyushpatle228@gmail.com \
--cc=rosenp@gmail.com \
--cc=sheetal@nvidia.com \
--cc=thierry.reding@kernel.org \
--cc=tiwai@suse.com \
--cc=u.kleine-koenig@baylibre.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