From nobody Sat Sep 21 19:35:26 2024 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2AD1CC38145 for ; Thu, 8 Sep 2022 16:12:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231195AbiIHQMv (ORCPT ); Thu, 8 Sep 2022 12:12:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59896 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231911AbiIHQMe (ORCPT ); Thu, 8 Sep 2022 12:12:34 -0400 Received: from madras.collabora.co.uk (madras.collabora.co.uk [46.235.227.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 919D91223AC for ; Thu, 8 Sep 2022 09:12:18 -0700 (PDT) Received: from notapiano.myfiosgateway.com (unknown [70.107.189.129]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: nfraprado) by madras.collabora.co.uk (Postfix) with ESMTPSA id 888606601FBA; Thu, 8 Sep 2022 17:12:15 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1662653537; bh=jIUdtkT4ddNfSHRyN+v/gxKe5FoYLf2qnOUA50l2MJs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=jtWMhA7rx+v6qQhy1Em7Y3pjtbUzQj8/i1otNHUbCYCcSaCUyEfcrU2ep2jWw7n+c Vi7Kw2+2ZrR9iKeic1dCieNkmsEanp0Dae2wZImJZrWNi7UyhFIG2bX6hvCUjh6S2R My48lMeVEcfu0JzQXZKVWZrHkuDftmfZ9BCePITcAodyj2OABTO2xo4MCuJfO08ZWc meiQP8R/jUvThecyTUbwOfNjOtkQl1GbPtCf1/xoIJwKQu8WwzWVdkHKF8OrnjPS1B uELc+YqiumTjSPxbkalPp1hg7QzjL51eJyZyiKGo2/hawSfVf94nhOdPd+hpTPOI/M VeILSfFXCcBRQ== From: =?UTF-8?q?N=C3=ADcolas=20F=2E=20R=2E=20A=2E=20Prado?= To: Mark Brown , Matthias Brugger Cc: kernel@collabora.com, AngeloGioacchino Del Regno , =?UTF-8?q?N=C3=ADcolas=20F=2E=20R=2E=20A=2E=20Prado?= , Chunxu Li , Dan Carpenter , Jaroslav Kysela , Jiaxin Yu , Liam Girdwood , Takashi Iwai , alsa-devel@alsa-project.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-mediatek@lists.infradead.org Subject: [PATCH 10/10] ASoC: mediatek: mt8186: Remove clock share parsing from DT Date: Thu, 8 Sep 2022 12:11:54 -0400 Message-Id: <20220908161154.648557-11-nfraprado@collabora.com> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20220908161154.648557-1-nfraprado@collabora.com> References: <20220908161154.648557-1-nfraprado@collabora.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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=C3=ADcolas F. R. A. Prado --- sound/soc/mediatek/mt8186/mt8186-dai-i2s.c | 30 ---------------------- 1 file changed, 30 deletions(-) diff --git a/sound/soc/mediatek/mt8186/mt8186-dai-i2s.c b/sound/soc/mediate= k/mt8186/mt8186-dai-i2s.c index 7e8cad682c83..f07181be4370 100644 --- a/sound/soc/mediatek/mt8186/mt8186-dai-i2s.c +++ b/sound/soc/mediatek/mt8186/mt8186-dai-i2s.c @@ -44,7 +44,6 @@ struct mtk_afe_i2s_priv { int low_jitter_en; int master; /* only i2s0 has slave mode*/ =20 - const char *share_property_name; int share_i2s_id; =20 int mclk_id; @@ -1140,50 +1139,26 @@ static const struct mtk_afe_i2s_priv mt8186_i2s_pri= v[DAI_I2S_NUM] =3D { [DAI_I2S0] =3D { .id =3D MT8186_DAI_I2S_0, .mclk_id =3D MT8186_I2S0_MCK, - .share_property_name =3D "i2s0-share", .share_i2s_id =3D -1, }, [DAI_I2S1] =3D { .id =3D MT8186_DAI_I2S_1, .mclk_id =3D MT8186_I2S1_MCK, - .share_property_name =3D "i2s1-share", .share_i2s_id =3D -1, }, [DAI_I2S2] =3D { .id =3D MT8186_DAI_I2S_2, .mclk_id =3D MT8186_I2S2_MCK, - .share_property_name =3D "i2s2-share", .share_i2s_id =3D -1, }, [DAI_I2S3] =3D { .id =3D MT8186_DAI_I2S_3, /* clock gate naming is hf_faud_i2s4_m_ck*/ .mclk_id =3D MT8186_I2S4_MCK, - .share_property_name =3D "i2s3-share", .share_i2s_id =3D -1, } }; =20 -static int mt8186_dai_i2s_get_share(struct mtk_base_afe *afe) -{ - struct mt8186_afe_private *afe_priv =3D afe->platform_priv; - const struct device_node *of_node =3D afe->dev->of_node; - const char *of_str; - const char *property_name; - struct mtk_afe_i2s_priv *i2s_priv; - int i; - - for (i =3D 0; i < DAI_I2S_NUM; i++) { - i2s_priv =3D afe_priv->dai_priv[mt8186_i2s_priv[i].id]; - property_name =3D mt8186_i2s_priv[i].share_property_name; - if (of_property_read_string(of_node, property_name, &of_str)) - continue; - i2s_priv->share_i2s_id =3D get_i2s_id_by_name(afe, of_str); - } - - return 0; -} - /** * mt8186_dai_i2s_set_share() - Set up I2S ports to share a single clock. * @afe: Pointer to &struct mtk_base_afe @@ -1252,10 +1227,5 @@ int mt8186_dai_i2s_register(struct mtk_base_afe *afe) if (ret) return ret; =20 - /* parse share i2s */ - ret =3D mt8186_dai_i2s_get_share(afe); - if (ret) - return ret; - return 0; } --=20 2.37.3