From: Sheetal <sheetal@nvidia.com>
To: Liam Girdwood <lgirdwood@gmail.com>,
Mark Brown <broonie@kernel.org>,
Thierry Reding <thierry.reding@kernel.org>,
Jonathan Hunter <jonathanh@nvidia.com>
Cc: Jaroslav Kysela <perex@perex.cz>, Takashi Iwai <tiwai@suse.com>,
"Mohan Kumar" <mkumard@nvidia.com>,
Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>,
<linux-sound@vger.kernel.org>, <linux-tegra@vger.kernel.org>,
<linux-kernel@vger.kernel.org>, Sheetal <sheetal@nvidia.com>
Subject: [PATCH v3 08/14] ASoC: tegra: Add error logging in tegra210_i2s driver
Date: Wed, 25 Mar 2026 10:14:31 +0000 [thread overview]
Message-ID: <20260325101437.3059693-9-sheetal@nvidia.com> (raw)
In-Reply-To: <20260325101437.3059693-1-sheetal@nvidia.com>
Log errors in the Tegra210 I2S probe and runtime callback paths.
Signed-off-by: Sheetal <sheetal@nvidia.com>
---
sound/soc/tegra/tegra210_i2s.c | 18 ++++++++++--------
1 file changed, 10 insertions(+), 8 deletions(-)
diff --git a/sound/soc/tegra/tegra210_i2s.c b/sound/soc/tegra/tegra210_i2s.c
index d8e02f0a3025..7bf76c9b640f 100644
--- a/sound/soc/tegra/tegra210_i2s.c
+++ b/sound/soc/tegra/tegra210_i2s.c
@@ -161,6 +161,7 @@ static int tegra210_i2s_init(struct snd_soc_dapm_widget *w,
stream = SNDRV_PCM_STREAM_CAPTURE;
status_reg = TEGRA210_I2S_TX_STATUS + i2s->soc_data->tx_offset;
} else {
+ dev_err(dev, "invalid I2S direction register 0x%x\n", w->reg);
return -EINVAL;
}
@@ -235,6 +236,7 @@ static int tegra210_i2s_set_fmt(struct snd_soc_dai *dai,
val = I2S_CTRL_MASTER_EN;
break;
default:
+ dev_err(dai->dev, "invalid clock provider format 0x%x\n", fmt);
return -EINVAL;
}
@@ -270,6 +272,7 @@ static int tegra210_i2s_set_fmt(struct snd_soc_dai *dai,
tegra210_i2s_set_data_offset(i2s, 0);
break;
default:
+ dev_err(dai->dev, "invalid I2S frame format 0x%x\n", fmt);
return -EINVAL;
}
@@ -290,6 +293,7 @@ static int tegra210_i2s_set_fmt(struct snd_soc_dai *dai,
val ^= I2S_CTRL_LRCK_POL_MASK;
break;
default:
+ dev_err(dai->dev, "invalid I2S clock inversion 0x%x\n", fmt);
return -EINVAL;
}
@@ -1070,10 +1074,9 @@ static int tegra210_i2s_probe(struct platform_device *pdev)
dev_set_drvdata(dev, i2s);
i2s->clk_i2s = devm_clk_get(dev, "i2s");
- if (IS_ERR(i2s->clk_i2s)) {
- dev_err(dev, "can't retrieve I2S bit clock\n");
- return PTR_ERR(i2s->clk_i2s);
- }
+ if (IS_ERR(i2s->clk_i2s))
+ return dev_err_probe(dev, PTR_ERR(i2s->clk_i2s),
+ "can't retrieve I2S bit clock\n");
/*
* Not an error, as this clock is needed only when some other I/O
@@ -1108,10 +1111,9 @@ static int tegra210_i2s_probe(struct platform_device *pdev)
err = devm_snd_soc_register_component(dev, i2s->soc_data->i2s_cmpnt,
tegra210_i2s_dais,
ARRAY_SIZE(tegra210_i2s_dais));
- if (err) {
- dev_err(dev, "can't register I2S component, err: %d\n", err);
- return err;
- }
+ if (err)
+ return dev_err_probe(dev, err,
+ "can't register I2S component\n");
pm_runtime_enable(dev);
--
2.17.1
next prev parent reply other threads:[~2026-03-25 10:15 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-25 10:14 [PATCH v3 00/14] ASoC: tegra: Add error logging for probe and callback failures Sheetal
2026-03-25 10:14 ` [PATCH v3 01/14] ASoC: tegra: Use dev_err_probe() in tegra186_asrc probe Sheetal
2026-03-25 13:03 ` Mark Brown
2026-03-25 10:14 ` [PATCH v3 02/14] ASoC: tegra: Use dev_err_probe() in tegra186_dspk probe Sheetal
2026-03-25 10:14 ` [PATCH v3 03/14] ASoC: tegra: Add error logging in tegra210_admaif driver Sheetal
2026-03-25 13:05 ` Mark Brown
2026-03-25 10:14 ` [PATCH v3 04/14] ASoC: tegra: Add error logging in tegra210_adx driver Sheetal
2026-03-25 10:14 ` [PATCH v3 05/14] ASoC: tegra: Use dev_err_probe() in tegra210_ahub probe Sheetal
2026-03-25 13:07 ` Mark Brown
2026-03-25 10:14 ` [PATCH v3 06/14] ASoC: tegra: Add error logging in tegra210_amx driver Sheetal
2026-03-25 10:14 ` [PATCH v3 07/14] ASoC: tegra: Use dev_err_probe() in tegra210_dmic probe Sheetal
2026-03-25 13:08 ` Mark Brown
2026-03-25 10:14 ` Sheetal [this message]
2026-03-25 10:14 ` [PATCH v3 09/14] ASoC: tegra: Use dev_err_probe() in OPE, PEQ and MBDRC drivers Sheetal
2026-03-25 13:10 ` Mark Brown
2026-03-25 10:14 ` [PATCH v3 10/14] ASoC: tegra: Use dev_err_probe() in tegra210_mixer probe Sheetal
2026-03-25 10:14 ` [PATCH v3 11/14] ASoC: tegra: Use dev_err_probe() in tegra210_mvc probe Sheetal
2026-03-25 10:14 ` [PATCH v3 12/14] ASoC: tegra: Use dev_err_probe() in tegra210_sfc probe Sheetal
2026-03-25 13:11 ` Mark Brown
2026-03-25 10:14 ` [PATCH v3 13/14] ASoC: tegra: Use dev_err_probe() in tegra_asoc_machine probe Sheetal
2026-03-25 10:14 ` [PATCH v3 14/14] ASoC: tegra: Use dev_err_probe() in tegra_audio_graph_card probe Sheetal
2026-03-25 13:18 ` (subset) [PATCH v3 00/14] ASoC: tegra: Add error logging for probe and callback failures Mark Brown
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=20260325101437.3059693-9-sheetal@nvidia.com \
--to=sheetal@nvidia.com \
--cc=broonie@kernel.org \
--cc=jonathanh@nvidia.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=mkumard@nvidia.com \
--cc=perex@perex.cz \
--cc=thierry.reding@kernel.org \
--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