]> git.itanic.dy.fi Git - linux-stable/commitdiff
ASoC: mediatek: mt8183: Remove clock share parsing from DT
authorNícolas F. R. A. Prado <nfraprado@collabora.com>
Thu, 8 Sep 2022 16:11:50 +0000 (12:11 -0400)
committerMark Brown <broonie@kernel.org>
Fri, 9 Sep 2022 17:48:58 +0000 (18:48 +0100)
Now that the clock sharing for i2s ports can be configured from the
sound machine driver, remove the logic that was used to parse the
properties from the devicetree.

Signed-off-by: Nícolas F. R. A. Prado <nfraprado@collabora.com>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Link: https://lore.kernel.org/r/20220908161154.648557-7-nfraprado@collabora.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/mediatek/mt8183/mt8183-dai-i2s.c

index 8902ff608d26a07ed9e51775adf50b8e26d57f49..6a9ace4180d3475bc6308a5a4df129afe7945308 100644 (file)
@@ -43,7 +43,6 @@ struct mtk_afe_i2s_priv {
        int rate; /* for determine which apll to use */
        int low_jitter_en;
 
-       const char *share_property_name;
        int share_i2s_id;
 
        int mclk_id;
@@ -977,55 +976,30 @@ static const struct mtk_afe_i2s_priv mt8183_i2s_priv[DAI_I2S_NUM] = {
        [DAI_I2S0] = {
                .id = MT8183_DAI_I2S_0,
                .mclk_id = MT8183_I2S0_MCK,
-               .share_property_name = "i2s0-share",
                .share_i2s_id = -1,
        },
        [DAI_I2S1] = {
                .id = MT8183_DAI_I2S_1,
                .mclk_id = MT8183_I2S1_MCK,
-               .share_property_name = "i2s1-share",
                .share_i2s_id = -1,
        },
        [DAI_I2S2] = {
                .id = MT8183_DAI_I2S_2,
                .mclk_id = MT8183_I2S2_MCK,
-               .share_property_name = "i2s2-share",
                .share_i2s_id = -1,
        },
        [DAI_I2S3] = {
                .id = MT8183_DAI_I2S_3,
                .mclk_id = MT8183_I2S3_MCK,
-               .share_property_name = "i2s3-share",
                .share_i2s_id = -1,
        },
        [DAI_I2S5] = {
                .id = MT8183_DAI_I2S_5,
                .mclk_id = MT8183_I2S5_MCK,
-               .share_property_name = "i2s5-share",
                .share_i2s_id = -1,
        },
 };
 
-static int mt8183_dai_i2s_get_share(struct mtk_base_afe *afe)
-{
-       struct mt8183_afe_private *afe_priv = afe->platform_priv;
-       const struct device_node *of_node = afe->dev->of_node;
-       const char *of_str;
-       const char *property_name;
-       struct mtk_afe_i2s_priv *i2s_priv;
-       int i;
-
-       for (i = 0; i < DAI_I2S_NUM; i++) {
-               i2s_priv = afe_priv->dai_priv[mt8183_i2s_priv[i].id];
-               property_name = mt8183_i2s_priv[i].share_property_name;
-               if (of_property_read_string(of_node, property_name, &of_str))
-                       continue;
-               i2s_priv->share_i2s_id = get_i2s_id_by_name(afe, of_str);
-       }
-
-       return 0;
-}
-
 /**
  * mt8183_dai_i2s_set_share() - Set up I2S ports to share a single clock.
  * @afe: Pointer to &struct mtk_base_afe
@@ -1100,10 +1074,5 @@ int mt8183_dai_i2s_register(struct mtk_base_afe *afe)
        if (ret)
                return ret;
 
-       /* parse share i2s */
-       ret = mt8183_dai_i2s_get_share(afe);
-       if (ret)
-               return ret;
-
        return 0;
 }