mirror of
git://nv-tegra.nvidia.com/linux-nv-oot.git
synced 2025-12-24 02:01:36 +03:00
tegra-alt: i2s: Modified i2s clock handling
Renamed i2s clock parent's property name in DT and changed this driver to reflect the same. Sync related clock usage is broken as of now. So DTs have removed sync related entries. Modified driver code to not result in error due to absence of sync clocks Bug 200515690 Change-Id: Ifa32dc35b7fbda23574a576597c9cc9e79b00ada Signed-off-by: Asha T <atalambedu@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/2137230 Reviewed-by: Sameer Pujar <spujar@nvidia.com> GVS: Gerrit_Virtual_Submit Reviewed-by: Sharad Gupta <sharadg@nvidia.com> Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
@@ -79,18 +79,18 @@ static int tegra210_i2s_set_clock_rate(struct device *dev, int clock_rate)
|
||||
if (((val & TEGRA210_I2S_CTRL_MASTER_EN_MASK) ==
|
||||
TEGRA210_I2S_CTRL_MASTER_EN)) {
|
||||
|
||||
ret = clk_set_rate(i2s->clk_i2s_sync, clock_rate);
|
||||
if (ret) {
|
||||
dev_err(dev, "Can't set I2S sync clock rate\n");
|
||||
return ret;
|
||||
}
|
||||
|
||||
ret = clk_set_parent(i2s->clk_audio_sync,
|
||||
i2s->clk_i2s_sync);
|
||||
if (ret) {
|
||||
dev_err(dev,
|
||||
"Can't set parent of i2s audio sync clock\n");
|
||||
return ret;
|
||||
if (!(IS_ERR(i2s->clk_i2s_sync)) && !(IS_ERR(i2s->clk_audio_sync))) {
|
||||
ret = clk_set_rate(i2s->clk_i2s_sync, clock_rate);
|
||||
if (ret) {
|
||||
dev_err(dev, "Can't set I2S sync clock rate\n");
|
||||
return ret;
|
||||
}
|
||||
ret = clk_set_parent(i2s->clk_audio_sync,
|
||||
i2s->clk_i2s_sync);
|
||||
if (ret) {
|
||||
dev_err(dev, "Can't set parent of i2s audio sync clock\n");
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
|
||||
ret = clk_set_parent(i2s->clk_i2s, i2s->clk_i2s_source);
|
||||
@@ -1078,20 +1078,14 @@ static int tegra210_i2s_platform_probe(struct platform_device *pdev)
|
||||
}
|
||||
|
||||
i2s->clk_i2s_sync = devm_clk_get(&pdev->dev, "ext_audio_sync");
|
||||
if (IS_ERR(i2s->clk_i2s_sync)) {
|
||||
dev_err(&pdev->dev, "Can't retrieve i2s_sync clock\n");
|
||||
ret = PTR_ERR(i2s->clk_i2s_sync);
|
||||
goto err;
|
||||
}
|
||||
if (IS_ERR(i2s->clk_i2s_sync))
|
||||
dev_dbg(&pdev->dev, "Can't retrieve i2s_sync clock\n");
|
||||
|
||||
i2s->clk_audio_sync = devm_clk_get(&pdev->dev, "audio_sync");
|
||||
if (IS_ERR(i2s->clk_audio_sync)) {
|
||||
dev_err(&pdev->dev, "Can't retrieve audio sync clock\n");
|
||||
ret = PTR_ERR(i2s->clk_audio_sync);
|
||||
goto err;
|
||||
}
|
||||
if (IS_ERR(i2s->clk_audio_sync))
|
||||
dev_dbg(&pdev->dev, "Can't retrieve audio sync clock\n");
|
||||
|
||||
i2s->clk_i2s_source = devm_clk_get(&pdev->dev, "pll_a_out0");
|
||||
i2s->clk_i2s_source = devm_clk_get(&pdev->dev, "i2s_clk_parent");
|
||||
if (IS_ERR(i2s->clk_i2s_source)) {
|
||||
dev_err(&pdev->dev, "Can't retrieve pll_a_out0 clock\n");
|
||||
ret = PTR_ERR(i2s->clk_i2s_source);
|
||||
|
||||
Reference in New Issue
Block a user