Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

ASoC: tegra: Add error logging in tegra210_i2s driver

Log errors in the Tegra210 I2S probe and runtime callback paths.

Signed-off-by: Sheetal <sheetal@nvidia.com>
Link: https://patch.msgid.link/20260325101437.3059693-9-sheetal@nvidia.com
Signed-off-by: Mark Brown <broonie@kernel.org>

authored by

Sheetal and committed by
Mark Brown
67b7bcdd ca069c34

+10 -8
+10 -8
sound/soc/tegra/tegra210_i2s.c
··· 161 161 stream = SNDRV_PCM_STREAM_CAPTURE; 162 162 status_reg = TEGRA210_I2S_TX_STATUS + i2s->soc_data->tx_offset; 163 163 } else { 164 + dev_err(dev, "invalid I2S direction register 0x%x\n", w->reg); 164 165 return -EINVAL; 165 166 } 166 167 ··· 236 235 val = I2S_CTRL_MASTER_EN; 237 236 break; 238 237 default: 238 + dev_err(dai->dev, "invalid clock provider format 0x%x\n", fmt); 239 239 return -EINVAL; 240 240 } 241 241 ··· 272 270 tegra210_i2s_set_data_offset(i2s, 0); 273 271 break; 274 272 default: 273 + dev_err(dai->dev, "invalid I2S frame format 0x%x\n", fmt); 275 274 return -EINVAL; 276 275 } 277 276 ··· 293 290 val ^= I2S_CTRL_LRCK_POL_MASK; 294 291 break; 295 292 default: 293 + dev_err(dai->dev, "invalid I2S clock inversion 0x%x\n", fmt); 296 294 return -EINVAL; 297 295 } 298 296 ··· 1074 1070 dev_set_drvdata(dev, i2s); 1075 1071 1076 1072 i2s->clk_i2s = devm_clk_get(dev, "i2s"); 1077 - if (IS_ERR(i2s->clk_i2s)) { 1078 - dev_err(dev, "can't retrieve I2S bit clock\n"); 1079 - return PTR_ERR(i2s->clk_i2s); 1080 - } 1073 + if (IS_ERR(i2s->clk_i2s)) 1074 + return dev_err_probe(dev, PTR_ERR(i2s->clk_i2s), 1075 + "can't retrieve I2S bit clock\n"); 1081 1076 1082 1077 /* 1083 1078 * Not an error, as this clock is needed only when some other I/O ··· 1111 1108 err = devm_snd_soc_register_component(dev, i2s->soc_data->i2s_cmpnt, 1112 1109 tegra210_i2s_dais, 1113 1110 ARRAY_SIZE(tegra210_i2s_dais)); 1114 - if (err) { 1115 - dev_err(dev, "can't register I2S component, err: %d\n", err); 1116 - return err; 1117 - } 1111 + if (err) 1112 + return dev_err_probe(dev, err, 1113 + "can't register I2S component\n"); 1118 1114 1119 1115 pm_runtime_enable(dev); 1120 1116