mirror of
git://nv-tegra.nvidia.com/linux-nv-oot.git
synced 2025-12-22 09:11:26 +03:00
asoc: tegra-alt: t210: admaif: remove clk apis
remove admaif clk get apis from admaif driver. admaif module is under ahub clock and no separate clock for this module. Change-Id: I5354aff4aba5c1d3c5c759704e35e53803e67242 Signed-off-by: Dara Ramesh <dramesh@nvidia.com> Reviewed-on: http://git-master/r/555497 Reviewed-by: Sumit Bhattacharya <sumitb@nvidia.com> Reviewed-by: Automatic_Commit_Validation_User GVS: Gerrit_Virtual_Submit
This commit is contained in:
committed by
Sameer Pujar
parent
1f080ab1eb
commit
e38df8b899
@@ -180,7 +180,6 @@ static int tegra210_admaif_runtime_suspend(struct device *dev)
|
|||||||
struct tegra210_admaif *admaif = dev_get_drvdata(dev);
|
struct tegra210_admaif *admaif = dev_get_drvdata(dev);
|
||||||
|
|
||||||
regcache_cache_only(admaif->regmap, true);
|
regcache_cache_only(admaif->regmap, true);
|
||||||
clk_disable(admaif->clk);
|
|
||||||
pm_runtime_put_sync(dev->parent);
|
pm_runtime_put_sync(dev->parent);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
@@ -197,12 +196,6 @@ static int tegra210_admaif_runtime_resume(struct device *dev)
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
ret = clk_enable(admaif->clk);
|
|
||||||
if (ret) {
|
|
||||||
dev_err(dev, "clk_enable failed: %d\n", ret);
|
|
||||||
return ret;
|
|
||||||
}
|
|
||||||
|
|
||||||
regcache_cache_only(admaif->regmap, false);
|
regcache_cache_only(admaif->regmap, false);
|
||||||
regcache_sync(admaif->regmap);
|
regcache_sync(admaif->regmap);
|
||||||
|
|
||||||
@@ -672,25 +665,18 @@ static int tegra210_admaif_probe(struct platform_device *pdev)
|
|||||||
goto err;
|
goto err;
|
||||||
}
|
}
|
||||||
|
|
||||||
admaif->clk = devm_clk_get(&pdev->dev, "admaif");
|
|
||||||
if (IS_ERR(admaif->clk)) {
|
|
||||||
dev_err(&pdev->dev, "Can't retrieve clock\n");
|
|
||||||
ret = PTR_ERR(admaif->clk);
|
|
||||||
goto err;
|
|
||||||
}
|
|
||||||
|
|
||||||
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
|
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
|
||||||
if (!res) {
|
if (!res) {
|
||||||
dev_err(&pdev->dev, "No memory resource for admaif\n");
|
dev_err(&pdev->dev, "No memory resource for admaif\n");
|
||||||
ret = -ENODEV;
|
ret = -ENODEV;
|
||||||
goto err_clk_put;
|
goto err;
|
||||||
}
|
}
|
||||||
|
|
||||||
regs = devm_request_and_ioremap(&pdev->dev, res);
|
regs = devm_request_and_ioremap(&pdev->dev, res);
|
||||||
if (!regs) {
|
if (!regs) {
|
||||||
dev_err(&pdev->dev, "request/iomap region failed\n");
|
dev_err(&pdev->dev, "request/iomap region failed\n");
|
||||||
ret = -ENODEV;
|
ret = -ENODEV;
|
||||||
goto err_clk_put;
|
goto err;
|
||||||
}
|
}
|
||||||
|
|
||||||
admaif->regmap = devm_regmap_init_mmio(&pdev->dev, regs,
|
admaif->regmap = devm_regmap_init_mmio(&pdev->dev, regs,
|
||||||
@@ -698,7 +684,7 @@ static int tegra210_admaif_probe(struct platform_device *pdev)
|
|||||||
if (IS_ERR(admaif->regmap)) {
|
if (IS_ERR(admaif->regmap)) {
|
||||||
dev_err(&pdev->dev, "regmap init failed\n");
|
dev_err(&pdev->dev, "regmap init failed\n");
|
||||||
ret = PTR_ERR(admaif->regmap);
|
ret = PTR_ERR(admaif->regmap);
|
||||||
goto err_clk_put;
|
goto err;
|
||||||
}
|
}
|
||||||
regcache_cache_only(admaif->regmap, true);
|
regcache_cache_only(admaif->regmap, true);
|
||||||
|
|
||||||
@@ -781,16 +767,12 @@ err_suspend:
|
|||||||
tegra210_admaif_runtime_suspend(&pdev->dev);
|
tegra210_admaif_runtime_suspend(&pdev->dev);
|
||||||
err_pm_disable:
|
err_pm_disable:
|
||||||
pm_runtime_disable(&pdev->dev);
|
pm_runtime_disable(&pdev->dev);
|
||||||
err_clk_put:
|
|
||||||
devm_clk_put(&pdev->dev, admaif->clk);
|
|
||||||
err:
|
err:
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int tegra210_admaif_remove(struct platform_device *pdev)
|
static int tegra210_admaif_remove(struct platform_device *pdev)
|
||||||
{
|
{
|
||||||
struct tegra210_admaif *admaif = dev_get_drvdata(&pdev->dev);
|
|
||||||
|
|
||||||
snd_soc_unregister_component(&pdev->dev);
|
snd_soc_unregister_component(&pdev->dev);
|
||||||
|
|
||||||
snd_soc_unregister_codec(&pdev->dev);
|
snd_soc_unregister_codec(&pdev->dev);
|
||||||
@@ -801,8 +783,6 @@ static int tegra210_admaif_remove(struct platform_device *pdev)
|
|||||||
if (!pm_runtime_status_suspended(&pdev->dev))
|
if (!pm_runtime_status_suspended(&pdev->dev))
|
||||||
tegra210_admaif_runtime_suspend(&pdev->dev);
|
tegra210_admaif_runtime_suspend(&pdev->dev);
|
||||||
|
|
||||||
devm_clk_put(&pdev->dev, admaif->clk);
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user