mirror of
https://github.com/torvalds/linux.git
synced 2026-09-23 22:14:03 +02:00
ASoC: tegra: tegra210: Use devm_clk_get_optional() for sync_input clock
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> Reviewed-by: Thierry Reding <treding@nvidia.com> Link: https://patch.msgid.link/20260715051115.17385-5-phucduc.bui@gmail.com Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
parent
f7cbc51424
commit
226791fa6d
|
|
@ -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))
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user