From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-17.0 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5DB30C433EF for ; Tue, 21 Sep 2021 21:39:01 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id DEEA861168 for ; Tue, 21 Sep 2021 21:39:00 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org DEEA861168 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=alsa-project.org Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 69359167C; Tue, 21 Sep 2021 23:38:09 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 69359167C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1632260339; bh=uMj9Yoh6CUT/R5lukGLiO6qATz85EOJ3O0N05idRBV8=; h=From:To:Subject:Date:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=L3C9wowKZhRwGHWrj2IE/cA7Y4lj7AEWxXdIFd+gWgrXtovM8SRjCY4H+xMU5tdSR 2OQusPGNL4h1XRV5zPd1Xdjz2m3irNC8NerYjIGK8gMKpwxSEK4RiRoVuFyETTXT34 Ajz9Xr6GuXtnuT9KaqaoYOdGJHVdqntykPEfhKaw= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 7B4F2F804E5; Tue, 21 Sep 2021 23:37:00 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id B7082F80124; Tue, 21 Sep 2021 23:36:58 +0200 (CEST) Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 01A3CF80124 for ; Tue, 21 Sep 2021 23:36:55 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 01A3CF80124 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="tqjvZBuD" Received: by mail.kernel.org (Postfix) with ESMTPSA id BA1E161165; Tue, 21 Sep 2021 21:36:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1632260213; bh=uMj9Yoh6CUT/R5lukGLiO6qATz85EOJ3O0N05idRBV8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=tqjvZBuDNE3AQUqLGvlxRWjUbryGsc68CTuppAikNFp0+iY5CWEKcYfo10PHQch8y zF7bEYnN9Ku7gH2P5+m1WMzCxAY0tah8ARn03fK3/7zwdv7hZUIRAGvd56KGDwX+1A FLhYouUVIpGN0NLIjhy0ldFdW5qYJADTkrIPJQADiOuVKzKo6FvoMPSfsXJ6HYYQCa UU10lGMMsEV/bH/dsNHG8i/liZZCq5kodkHCeeqdqUCXPhEEKILsQ87mky5VNJjzDY JD1TRcHE/MNI9QxuYDQQUCpQBv6QnU62ZFql689YBZqL/w3cTYjM6Ze8u41uYmhBa7 DjyXKCw2De8cQ== From: Mark Brown To: Liam Girdwood , Nicolin Chen , Xiubo Li , Fabio Estevam , Shengjiu Wang Subject: [PATCH v2 04/16] ASoC: fsl-esai: Update to modern clocking terminology Date: Tue, 21 Sep 2021 22:35:30 +0100 Message-Id: <20210921213542.31688-4-broonie@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210921213542.31688-1-broonie@kernel.org> References: <20210921213542.31688-1-broonie@kernel.org> MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=2755; h=from:subject; bh=uMj9Yoh6CUT/R5lukGLiO6qATz85EOJ3O0N05idRBV8=; b=owEBbQGS/pANAwAKASTWi3JdVIfQAcsmYgBhSk8V5GCkDdvG7GRD8CbzywYtb1V7yAJYV3zbSkaL E0KV0yeJATMEAAEKAB0WIQSt5miqZ1cYtZ/in+ok1otyXVSH0AUCYUpPFQAKCRAk1otyXVSH0D5CB/ 469q8NpbuqDI/s0fQ8LN6BINyy699D7QaYxRYmegp3vWOr0XSonhQm3/EJ17cUaQzVqbzwXiXw+scc wA2DZ1zk+UxBkHXtLWBvTDa8VCAyhdxBmKB8ST/wWPa+P4tOdaRBgdAKWLR/TykYl460CiEj5fhkRc PnqZOYP5JWknor3PYKwwt3DieS3Kn1Xuf7ryqXhw2jVEd3whnEs0qgE17k1LXBWY3MLo07L934zY90 B7e4UBwkD/aPz19j9K2wsRnJmNguCaor7YQT+pORJBLc1A6jpBkPg3c0uPewWsv/5TIU/2phnaLEFe 0vfX34hvVTLmL+IWVbhpi2QEguB29N X-Developer-Key: i=broonie@kernel.org; a=openpgp; fpr=3F2568AAC26998F9E813A1C5C3F436CA30F5D8EB Content-Transfer-Encoding: 8bit Cc: alsa-devel@alsa-project.org, Mark Brown , linuxppc-dev@lists.ozlabs.org, linux-arm-kernel@lists.infradead.org X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" As part of moving to remove the old style defines for the bus clocks update the fsl-esai driver to use more modern terminology for clocking. Signed-off-by: Mark Brown --- sound/soc/fsl/fsl_esai.c | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/sound/soc/fsl/fsl_esai.c b/sound/soc/fsl/fsl_esai.c index bda66b30e063..3a9e2df4e16f 100644 --- a/sound/soc/fsl/fsl_esai.c +++ b/sound/soc/fsl/fsl_esai.c @@ -52,7 +52,7 @@ struct fsl_esai_soc_data { * @sck_rate: clock rate of desired SCKx clock * @hck_dir: the direction of HCKx pads * @sck_div: if using PSR/PM dividers for SCKx clock - * @slave_mode: if fully using DAI slave mode + * @consumer_mode: if fully using DAI clock consumer mode * @synchronous: if using tx/rx synchronous mode * @name: driver name */ @@ -78,7 +78,7 @@ struct fsl_esai { u32 sck_rate[2]; bool hck_dir[2]; bool sck_div[2]; - bool slave_mode; + bool consumer_mode; bool synchronous; char name[32]; }; @@ -366,8 +366,8 @@ static int fsl_esai_set_bclk(struct snd_soc_dai *dai, bool tx, u32 freq) u32 sub, ratio = hck_rate / freq; int ret; - /* Don't apply for fully slave mode or unchanged bclk */ - if (esai_priv->slave_mode || esai_priv->sck_rate[tx] == freq) + /* Don't apply for fully consumer mode or unchanged bclk */ + if (esai_priv->consumer_mode || esai_priv->sck_rate[tx] == freq) return 0; if (ratio * freq > hck_rate) @@ -476,20 +476,20 @@ static int fsl_esai_set_dai_fmt(struct snd_soc_dai *dai, unsigned int fmt) return -EINVAL; } - esai_priv->slave_mode = false; + esai_priv->consumer_mode = false; - /* DAI clock master masks */ - switch (fmt & SND_SOC_DAIFMT_MASTER_MASK) { - case SND_SOC_DAIFMT_CBM_CFM: - esai_priv->slave_mode = true; + /* DAI clock provider masks */ + switch (fmt & SND_SOC_DAIFMT_CLOCK_PROVIDER_MASK) { + case SND_SOC_DAIFMT_CBP_CFP: + esai_priv->consumer_mode = true; break; - case SND_SOC_DAIFMT_CBS_CFM: + case SND_SOC_DAIFMT_CBC_CFP: xccr |= ESAI_xCCR_xCKD; break; - case SND_SOC_DAIFMT_CBM_CFS: + case SND_SOC_DAIFMT_CBP_CFC: xccr |= ESAI_xCCR_xFSD; break; - case SND_SOC_DAIFMT_CBS_CFS: + case SND_SOC_DAIFMT_CBC_CFC: xccr |= ESAI_xCCR_xFSD | ESAI_xCCR_xCKD; break; default: @@ -1016,8 +1016,8 @@ static int fsl_esai_probe(struct platform_device *pdev) /* Set a default slot number */ esai_priv->slots = 2; - /* Set a default master/slave state */ - esai_priv->slave_mode = true; + /* Set a default clock provider state */ + esai_priv->consumer_mode = true; /* Determine the FIFO depth */ iprop = of_get_property(np, "fsl,fifo-depth", NULL); -- 2.20.1