Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp182860pxk; Wed, 16 Sep 2020 23:25:37 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw6V09L60XtkgZWjhc+Qd/rcis/tASDtX3j2Yvkpc0Vawy9r/ccC+zE3O1uM/+6p4Kopgw1 X-Received: by 2002:a17:906:1d08:: with SMTP id n8mr30357655ejh.236.1600323936928; Wed, 16 Sep 2020 23:25:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600323936; cv=none; d=google.com; s=arc-20160816; b=VmwY+MIVnbi5WITuUbGu43laW45mYRNTgcvFzx8yyuVsnaNtXAkXYgpbjyG8YCLFkn LEoCKMv2R6NflG5zUWOlvP1cTwjPIUPOxNK0/C2L3LJbOrabYE7yWHrs83fgeXeYY1rW kKbXQ2SgG6XRX5Mg5evSGV4yD6KUo2Ks0C0nBS+jfMcip2RnrUpKVD/M1SwElBCpoQmV m3nGyymNXmbiZX/s4k9cfBBzlrtH8lq2JbQ4yRfrE5FGmSCJvEm4NTNw9Z8LOESUUrls 1Ek2p2G3w83xux7sOucqihPLj2YJIGE20KizvukhbleZ/m7jxmDfUlUfwcywGXKMZfCC Hx8A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:references:in-reply-to:message-id:date:subject :cc:to:from; bh=7RwPmxmMesU2KrQ8anDsjBfkpzk+U7CSVaCZLW7xWKA=; b=HobfTa4CBZfAC2rPJeTPY+P6hihACVcIL/bEmM6eihE13FpGwsTKu0f3Z6MQG5CygR o5ZbXKI1WuIDRFydxlv+9fVwp7CrctgF2UOlruVxvxUrZfTTPHgJ6C8XE2KOWAs2oCWu PLz/dR+biiteC7EE/hiY6UPgdmAokoUrGjn9NViEdyndRivJr0z+28udOw5NkjMaUiB/ qfT5LGH9xvfJbIerTpOLYqeCWypycHdkLp46RTo6fam3O3KmyffOqWfD9gdI1a4fuP+/ ZK1VnHbEoH6O3mv1DqrNqavXveOcrDTzb0l8SuMOqlpU8b8jqYLeTDd+gkz0sAgtQA6Z UUFA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id lf11si12997617ejb.48.2020.09.16.23.25.13; Wed, 16 Sep 2020 23:25:36 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726273AbgIQGX7 (ORCPT + 99 others); Thu, 17 Sep 2020 02:23:59 -0400 Received: from inva021.nxp.com ([92.121.34.21]:60126 "EHLO inva021.nxp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725267AbgIQGX6 (ORCPT ); Thu, 17 Sep 2020 02:23:58 -0400 Received: from inva021.nxp.com (localhost [127.0.0.1]) by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id 9EF45201507; Thu, 17 Sep 2020 08:18:13 +0200 (CEST) Received: from invc005.ap-rdc01.nxp.com (invc005.ap-rdc01.nxp.com [165.114.16.14]) by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id 2BB9D2000B5; Thu, 17 Sep 2020 08:18:09 +0200 (CEST) Received: from 10.192.242.69 (shlinux2.ap.freescale.net [10.192.224.44]) by invc005.ap-rdc01.nxp.com (Postfix) with ESMTP id 8CAE5402AE; Thu, 17 Sep 2020 08:18:03 +0200 (CEST) From: Shengjiu Wang To: timur@kernel.org, nicoleotsuka@gmail.com, Xiubo.Lee@gmail.com, festevam@gmail.com, broonie@kernel.org, perex@perex.cz, tiwai@suse.com, alsa-devel@alsa-project.org, lgirdwood@gmail.com Cc: linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 3/3] ASoC: fsl_sai: Set MCLK input or output direction Date: Thu, 17 Sep 2020 14:11:19 +0800 Message-Id: <1600323079-5317-4-git-send-email-shengjiu.wang@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1600323079-5317-1-git-send-email-shengjiu.wang@nxp.com> References: <1600323079-5317-1-git-send-email-shengjiu.wang@nxp.com> X-Virus-Scanned: ClamAV using ClamSMTP Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org SAI support select MCLK direction with version.major > 3 and version.minor > 1, the default direction is input, set it to be output according to DT property. Signed-off-by: Shengjiu Wang Acked-by: Nicolin Chen --- sound/soc/fsl/fsl_sai.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/sound/soc/fsl/fsl_sai.c b/sound/soc/fsl/fsl_sai.c index 738b4dda7847..5117c1cd5682 100644 --- a/sound/soc/fsl/fsl_sai.c +++ b/sound/soc/fsl/fsl_sai.c @@ -1117,6 +1117,13 @@ static int fsl_sai_probe(struct platform_device *pdev) if (ret < 0) dev_warn(&pdev->dev, "Error reading SAI version: %d\n", ret); + /* Select MCLK direction */ + if (of_find_property(np, "fsl,sai-mclk-direction-output", NULL) && + sai->verid.major >= 3 && sai->verid.minor >= 1) { + regmap_update_bits(sai->regmap, FSL_SAI_MCTL, + FSL_SAI_MCTL_MCLK_EN, FSL_SAI_MCTL_MCLK_EN); + } + pm_runtime_enable(&pdev->dev); regcache_cache_only(sai->regmap, true); -- 2.27.0