From 9c3c3fbc35b6cd61745fbb26dc888ec25d52239a Mon Sep 17 00:00:00 2001 From: Sameer Pujar Date: Sun, 30 Jun 2019 08:45:26 +0530 Subject: [PATCH] ASoC: tegra-alt: remove dev.id parsing from DT For AHUB modules instance number is passed with a DT property. For example, "nvidia,ahub-i2s-id" property is used in I2S nodes. Similarly other modules use "nvidia,ahub--id" property, where is "dmic" or "dspk" or other corresponding module names. With DAI links in DT now, this is not required any more. Hence the parsing code for such properties is removed. Bug 200503387 Change-Id: Ia372044ebecfe090668953b8da81028c63812a4f Signed-off-by: Sameer Pujar Reviewed-on: https://git-master.nvidia.com/r/2146859 Reviewed-by: mobile promotions Tested-by: mobile promotions --- sound/soc/tegra-alt/tegra186_arad_alt.c | 7 ------- sound/soc/tegra-alt/tegra186_asrc_alt.c | 7 ------- sound/soc/tegra-alt/tegra186_dspk_alt.c | 7 ------- sound/soc/tegra-alt/tegra210_adx_alt.c | 8 -------- sound/soc/tegra-alt/tegra210_afc_alt.c | 8 -------- sound/soc/tegra-alt/tegra210_amx_alt.c | 8 -------- sound/soc/tegra-alt/tegra210_dmic_alt.c | 7 ------- sound/soc/tegra-alt/tegra210_i2s_alt.c | 16 +++------------- sound/soc/tegra-alt/tegra210_iqc_alt.c | 8 -------- sound/soc/tegra-alt/tegra210_mixer_alt.c | 8 -------- sound/soc/tegra-alt/tegra210_mvc_alt.c | 8 -------- sound/soc/tegra-alt/tegra210_ope_alt.c | 8 -------- sound/soc/tegra-alt/tegra210_sfc_alt.c | 8 -------- sound/soc/tegra-alt/tegra210_spdif_alt.c | 7 ------- 14 files changed, 3 insertions(+), 112 deletions(-) diff --git a/sound/soc/tegra-alt/tegra186_arad_alt.c b/sound/soc/tegra-alt/tegra186_arad_alt.c index f1e3879f..c53976f6 100644 --- a/sound/soc/tegra-alt/tegra186_arad_alt.c +++ b/sound/soc/tegra-alt/tegra186_arad_alt.c @@ -772,13 +772,6 @@ static int tegra186_arad_platform_probe(struct platform_device *pdev) } regcache_cache_only(arad->regmap, true); - ret = of_property_read_u32(pdev->dev.of_node, "nvidia,ahub-arad-id", - &pdev->dev.id); - if (ret < 0) { - dev_err(&pdev->dev, "Missing property nvidia,ahub-arad-id\n"); - return ret; - } - pm_runtime_enable(&pdev->dev); ret = snd_soc_register_codec(&pdev->dev, &tegra186_arad_codec, diff --git a/sound/soc/tegra-alt/tegra186_asrc_alt.c b/sound/soc/tegra-alt/tegra186_asrc_alt.c index f889f4d1..7ecde812 100644 --- a/sound/soc/tegra-alt/tegra186_asrc_alt.c +++ b/sound/soc/tegra-alt/tegra186_asrc_alt.c @@ -1114,13 +1114,6 @@ static int tegra186_asrc_platform_probe(struct platform_device *pdev) } regcache_cache_only(asrc->regmap, true); - ret = of_property_read_u32(pdev->dev.of_node, "nvidia,ahub-asrc-id", - &pdev->dev.id); - if (ret < 0) { - dev_err(&pdev->dev, "Missing property nvidia,ahub-asrc-id\n"); - return ret; - } - #ifdef CONFIG_TEGRA186_AHC tegra186_ahc_register_cb(tegra186_asrc_ahc_cb, TEGRA186_AHC_ASRC1_CB, &pdev->dev); diff --git a/sound/soc/tegra-alt/tegra186_dspk_alt.c b/sound/soc/tegra-alt/tegra186_dspk_alt.c index 25acfc1b..1447985a 100644 --- a/sound/soc/tegra-alt/tegra186_dspk_alt.c +++ b/sound/soc/tegra-alt/tegra186_dspk_alt.c @@ -463,13 +463,6 @@ static int tegra186_dspk_platform_probe(struct platform_device *pdev) } regcache_cache_only(dspk->regmap, true); - ret = of_property_read_u32(np, "nvidia,ahub-dspk-id", - &pdev->dev.id); - if (ret < 0) { - dev_err(&pdev->dev, "Missing property nvidia,ahub-dspk-id\n"); - return ret; - } - pm_runtime_enable(&pdev->dev); ret = snd_soc_register_codec(&pdev->dev, &tegra186_dspk_codec, tegra186_dspk_dais, diff --git a/sound/soc/tegra-alt/tegra210_adx_alt.c b/sound/soc/tegra-alt/tegra210_adx_alt.c index 6f705006..14407346 100644 --- a/sound/soc/tegra-alt/tegra210_adx_alt.c +++ b/sound/soc/tegra-alt/tegra210_adx_alt.c @@ -820,14 +820,6 @@ static int tegra210_adx_platform_probe(struct platform_device *pdev) } regcache_cache_only(adx->regmap, true); - ret = of_property_read_u32(pdev->dev.of_node, - "nvidia,ahub-adx-id", - &pdev->dev.id); - if (ret < 0) { - dev_err(&pdev->dev, "Missing property nvidia,ahub-adx-id\n"); - return ret; - } - pm_runtime_enable(&pdev->dev); ret = snd_soc_register_codec(&pdev->dev, &tegra210_adx_codec, tegra210_adx_dais, diff --git a/sound/soc/tegra-alt/tegra210_afc_alt.c b/sound/soc/tegra-alt/tegra210_afc_alt.c index ed23fc1d..77ddfbb2 100644 --- a/sound/soc/tegra-alt/tegra210_afc_alt.c +++ b/sound/soc/tegra-alt/tegra210_afc_alt.c @@ -541,14 +541,6 @@ static int tegra210_afc_platform_probe(struct platform_device *pdev) } regcache_cache_only(afc->regmap, true); - ret = of_property_read_u32(pdev->dev.of_node, - "nvidia,ahub-afc-id", - &pdev->dev.id); - if (ret < 0) { - dev_err(&pdev->dev, "Missing property nvidia,ahub-afc-id\n"); - return -ret; - } - /* Disable SLGC */ regmap_write(afc->regmap, TEGRA210_AFC_CG, 0); diff --git a/sound/soc/tegra-alt/tegra210_amx_alt.c b/sound/soc/tegra-alt/tegra210_amx_alt.c index 09698e68..d2a8d8c9 100644 --- a/sound/soc/tegra-alt/tegra210_amx_alt.c +++ b/sound/soc/tegra-alt/tegra210_amx_alt.c @@ -904,14 +904,6 @@ static int tegra210_amx_platform_probe(struct platform_device *pdev) } regcache_cache_only(amx->regmap, true); - ret = of_property_read_u32(pdev->dev.of_node, - "nvidia,ahub-amx-id", - &pdev->dev.id); - if (ret < 0) { - dev_err(&pdev->dev, "Missing property nvidia,ahub-amx-id\n"); - return ret; - } - pm_runtime_enable(&pdev->dev); ret = snd_soc_register_codec(&pdev->dev, &tegra210_amx_codec, tegra210_amx_dais, diff --git a/sound/soc/tegra-alt/tegra210_dmic_alt.c b/sound/soc/tegra-alt/tegra210_dmic_alt.c index 5a18b50e..11469c38 100644 --- a/sound/soc/tegra-alt/tegra210_dmic_alt.c +++ b/sound/soc/tegra-alt/tegra210_dmic_alt.c @@ -582,13 +582,6 @@ static int tegra210_dmic_platform_probe(struct platform_device *pdev) regmap_write(dmic->regmap, TEGRA210_DMIC_DCR_BIQUAD_0_COEF_4, 0x00000000); - ret = of_property_read_u32(np, "nvidia,ahub-dmic-id", - &pdev->dev.id); - if (ret < 0) { - dev_err(&pdev->dev, "Missing property nvidia,ahub-dmic-id\n"); - return ret; - } - pm_runtime_enable(&pdev->dev); ret = snd_soc_register_codec(&pdev->dev, &tegra210_dmic_codec, tegra210_dmic_dais, diff --git a/sound/soc/tegra-alt/tegra210_i2s_alt.c b/sound/soc/tegra-alt/tegra210_i2s_alt.c index af819121..ce3af260 100644 --- a/sound/soc/tegra-alt/tegra210_i2s_alt.c +++ b/sound/soc/tegra-alt/tegra210_i2s_alt.c @@ -1095,30 +1095,20 @@ static int tegra210_i2s_platform_probe(struct platform_device *pdev) } regcache_cache_only(i2s->regmap, true); - ret = of_property_read_u32(np, "nvidia,ahub-i2s-id", - &pdev->dev.id); - if (ret < 0) { - dev_err(&pdev->dev, "Missing property nvidia,ahub-i2s-id\n"); - return ret; - } - if (of_property_read_u32(pdev->dev.of_node, "bclk-ratio", &i2s->bclk_ratio) < 0) { - dev_dbg(&pdev->dev, "Missing prop bclk-ratio for I2S%d\n", - pdev->dev.id); + dev_dbg(&pdev->dev, "Missing prop bclk-ratio for I2S\n"); i2s->bclk_ratio = 1; } if (of_property_read_u32(pdev->dev.of_node, "fsync-width", &i2s->fsync_width) < 0) { - dev_info(&pdev->dev, "Missing prop fsync-width for I2S%d\n", - pdev->dev.id); + dev_info(&pdev->dev, "Missing prop fsync-width for I2S\n"); i2s->fsync_width = 31; } if (i2s->fsync_width > 255) { - dev_warn(&pdev->dev, "Default fsync-width to 31 for I2S%d\n", - pdev->dev.id); + dev_warn(&pdev->dev, "Default fsync-width to 31 for I2S\n"); i2s->fsync_width = 31; } diff --git a/sound/soc/tegra-alt/tegra210_iqc_alt.c b/sound/soc/tegra-alt/tegra210_iqc_alt.c index 8fd56a31..62f36f1e 100644 --- a/sound/soc/tegra-alt/tegra210_iqc_alt.c +++ b/sound/soc/tegra-alt/tegra210_iqc_alt.c @@ -326,14 +326,6 @@ static int tegra210_iqc_platform_probe(struct platform_device *pdev) } regcache_cache_only(iqc->regmap, true); - ret = of_property_read_u32(pdev->dev.of_node, - "nvidia,ahub-iqc-id", - &pdev->dev.id); - if (ret < 0) { - dev_err(&pdev->dev, "Missing property nvidia,ahub-iqc-id\n"); - return ret; - } - if (of_property_read_u32(pdev->dev.of_node, "timestamp-enable", &iqc->timestamp_enable) < 0) { diff --git a/sound/soc/tegra-alt/tegra210_mixer_alt.c b/sound/soc/tegra-alt/tegra210_mixer_alt.c index cc339238..82ef7bc5 100644 --- a/sound/soc/tegra-alt/tegra210_mixer_alt.c +++ b/sound/soc/tegra-alt/tegra210_mixer_alt.c @@ -723,14 +723,6 @@ static int tegra210_mixer_platform_probe(struct platform_device *pdev) } regcache_cache_only(mixer->regmap, true); - ret = of_property_read_u32(pdev->dev.of_node, - "nvidia,ahub-amixer-id", - &pdev->dev.id); - if (ret < 0) { - dev_err(&pdev->dev, "Missing property nvidia,ahub-amixer-id\n"); - return ret; - } - pm_runtime_enable(&pdev->dev); ret = snd_soc_register_codec(&pdev->dev, &tegra210_mixer_codec, tegra210_mixer_dais, diff --git a/sound/soc/tegra-alt/tegra210_mvc_alt.c b/sound/soc/tegra-alt/tegra210_mvc_alt.c index 510227c3..3c35bd00 100644 --- a/sound/soc/tegra-alt/tegra210_mvc_alt.c +++ b/sound/soc/tegra-alt/tegra210_mvc_alt.c @@ -647,14 +647,6 @@ static int tegra210_mvc_platform_probe(struct platform_device *pdev) } regcache_cache_only(mvc->regmap, true); - ret = of_property_read_u32(pdev->dev.of_node, - "nvidia,ahub-mvc-id", - &pdev->dev.id); - if (ret < 0) { - dev_err(&pdev->dev, "Missing property nvidia,ahub-mvc-id\n"); - return ret; - } - pm_runtime_enable(&pdev->dev); ret = snd_soc_register_codec(&pdev->dev, &tegra210_mvc_codec, tegra210_mvc_dais, diff --git a/sound/soc/tegra-alt/tegra210_ope_alt.c b/sound/soc/tegra-alt/tegra210_ope_alt.c index 63056ece..5a18c3f0 100644 --- a/sound/soc/tegra-alt/tegra210_ope_alt.c +++ b/sound/soc/tegra-alt/tegra210_ope_alt.c @@ -355,14 +355,6 @@ static int tegra210_ope_platform_probe(struct platform_device *pdev) } regcache_cache_only(ope->mbdrc_regmap, true); - ret = of_property_read_u32(pdev->dev.of_node, - "nvidia,ahub-ope-id", - &pdev->dev.id); - if (ret < 0) { - dev_err(&pdev->dev, "Missing property nvidia,ahub-ope-id\n"); - return ret; - } - pm_runtime_enable(&pdev->dev); ret = snd_soc_register_codec(&pdev->dev, &tegra210_ope_codec, tegra210_ope_dais, diff --git a/sound/soc/tegra-alt/tegra210_sfc_alt.c b/sound/soc/tegra-alt/tegra210_sfc_alt.c index dbb5bfb3..ee488e6c 100644 --- a/sound/soc/tegra-alt/tegra210_sfc_alt.c +++ b/sound/soc/tegra-alt/tegra210_sfc_alt.c @@ -3553,14 +3553,6 @@ static int tegra210_sfc_platform_probe(struct platform_device *pdev) } regcache_cache_only(sfc->regmap, true); - ret = of_property_read_u32(pdev->dev.of_node, - "nvidia,ahub-sfc-id", - &pdev->dev.id); - if (ret < 0) { - dev_err(&pdev->dev, "Missing property nvidia,ahub-sfc-id\n"); - return ret; - } - pm_runtime_enable(&pdev->dev); ret = snd_soc_register_codec(&pdev->dev, &tegra210_sfc_codec, tegra210_sfc_dais, diff --git a/sound/soc/tegra-alt/tegra210_spdif_alt.c b/sound/soc/tegra-alt/tegra210_spdif_alt.c index 5eeafc7f..981e14da 100644 --- a/sound/soc/tegra-alt/tegra210_spdif_alt.c +++ b/sound/soc/tegra-alt/tegra210_spdif_alt.c @@ -427,13 +427,6 @@ static int tegra210_spdif_platform_probe(struct platform_device *pdev) } regcache_cache_only(spdif->regmap, true); - ret = of_property_read_u32(np, "nvidia,ahub-spdif-id", - &pdev->dev.id); - if (ret < 0) { - dev_err(&pdev->dev, "Missing property nvidia,ahub-spdif-id\n"); - return ret; - } - pm_runtime_enable(&pdev->dev); ret = snd_soc_register_codec(&pdev->dev, &tegra210_spdif_codec, tegra210_spdif_dais,