Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp372249ybl; Tue, 7 Jan 2020 21:36:01 -0800 (PST) X-Google-Smtp-Source: APXvYqxANQlOcq7BQ9LFb1Q+NYHCrmHsM73YZFpZD/0Di9XJ/Www0GBcp3fdiQL8Wsjff9Ks4GoF X-Received: by 2002:a05:6808:181:: with SMTP id w1mr1803183oic.176.1578461761109; Tue, 07 Jan 2020 21:36:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1578461761; cv=none; d=google.com; s=arc-20160816; b=aPMF9xwHLHB+jch5zG3S/SgPw6TVYn5n+giJ/N0ZEpNXYQIsdBajWup3NWysH2Z9hp 4vxTCIIXw5Fa0npRM5tTS7i1mC/S8oQQoeWkPgdSuVjhJlSc/F9F190AViSgW9tSFfxe fbGdT8+yasBrxrMKfGLZLLJ+J/Or2EJGSHx1yhxd8Dd3RM1JB3qC+nMw0+fEcYdpdjIG k8qbyjE0UVTVW5NXnoEVscQ0jsk4uDXvmLT+8NJYbkmn+iv1+lmMmuflydDTk6X+ldqi N8Rya82VbkPvARF8ADfCpUkuGC+xyEL2qraMA2E3Hax2FqPv6DaBkLJPsOkMgBQs2sb/ spug== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:dkim-signature:content-language :content-transfer-encoding:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=ooJxGk1Mj4xaggKc+sBCL1z4jOUVJa4U4iUSojVi5Pc=; b=EFsolEXwwEpX3/SIFGYbO+oMdPfCgLriBdfQdg7WWGJcrTSV2bYNHnQDYnQuIW2Ff+ Ej1JJLF9ExeAazTEPLqJMgnwrKjzUkCGZhapxCs5a82ifzDCJJcIHS9PDN4nw27h9H2C xdhY5QGuRca3QHV2lQKPu544ntaZp7hA9g1lemZelgok5/FoMzBM59/+kgcgNvAU/F4o bCPfMp1IlhXXzzxKl+airKFABYpIRhp/mfnMBVPdCZ845+fMLqpetkrPGlLakdFwuYiu thH+k9iKBTu8VLWJi3L4qVe0/6OFYgkv47Cr7VRgkskrl8N8D/Ko/o8Vor8eslygHs7y Sz3A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nvidia.com header.s=n1 header.b=GZuc0rwo; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nvidia.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 3si1602849otz.198.2020.01.07.21.35.48; Tue, 07 Jan 2020 21:36:01 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@nvidia.com header.s=n1 header.b=GZuc0rwo; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nvidia.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726667AbgAHFe6 (ORCPT + 99 others); Wed, 8 Jan 2020 00:34:58 -0500 Received: from hqnvemgate26.nvidia.com ([216.228.121.65]:15278 "EHLO hqnvemgate26.nvidia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726079AbgAHFe5 (ORCPT ); Wed, 8 Jan 2020 00:34:57 -0500 Received: from hqpgpgate101.nvidia.com (Not Verified[216.228.121.13]) by hqnvemgate26.nvidia.com (using TLS: TLSv1.2, DES-CBC3-SHA) id ; Tue, 07 Jan 2020 21:34:39 -0800 Received: from hqmail.nvidia.com ([172.20.161.6]) by hqpgpgate101.nvidia.com (PGP Universal service); Tue, 07 Jan 2020 21:34:56 -0800 X-PGP-Universal: processed; by hqpgpgate101.nvidia.com on Tue, 07 Jan 2020 21:34:56 -0800 Received: from [10.24.44.157] (10.124.1.5) by HQMAIL107.nvidia.com (172.20.187.13) with Microsoft SMTP Server (TLS) id 15.0.1473.3; Wed, 8 Jan 2020 05:34:50 +0000 Subject: Re: [PATCH v7 15/21] ASoC: tegra: Add fallback implementation for audio mclk To: Sowjanya Komatineni , , , , , , , , , , , , CC: , , , , , , , , , References: <1578457515-3477-1-git-send-email-skomatineni@nvidia.com> <1578457515-3477-16-git-send-email-skomatineni@nvidia.com> From: Sameer Pujar Message-ID: Date: Wed, 8 Jan 2020 11:04:47 +0530 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.9.1 MIME-Version: 1.0 In-Reply-To: <1578457515-3477-16-git-send-email-skomatineni@nvidia.com> X-Originating-IP: [10.124.1.5] X-ClientProxiedBy: HQMAIL111.nvidia.com (172.20.187.18) To HQMAIL107.nvidia.com (172.20.187.13) Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-GB DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nvidia.com; s=n1; t=1578461679; bh=ooJxGk1Mj4xaggKc+sBCL1z4jOUVJa4U4iUSojVi5Pc=; h=X-PGP-Universal:Subject:To:CC:References:From:Message-ID:Date: User-Agent:MIME-Version:In-Reply-To:X-Originating-IP: X-ClientProxiedBy:Content-Type:Content-Transfer-Encoding: Content-Language; b=GZuc0rwo2hc8I1wHVYCC44JBPoD1pyB+PuI2wWCn5ErgMpXDuZctfA22ZZmFmDzXJ H6jaH0bnOh5sPy2XvJkLRF8xr7kmn9CPhxBgKBYoIXl9Bw3un8hYQtMmdQ9RFGViX1 0epv7NMFAcF//b8SY6CfgZh7PQe7Ttihomu7WYr7I9e1+q+A5FMCdOsvA3qmKys58u FdTrNm7FrryoDjlf1CL8HGr6w1u8JOjf1+Sc91ZAwQRFZFU/43xDdpgolxgDMYj/Gr 15AvZvhiUciGg4rT/rFJtw7jer4DOM5IaNjP8Ke9vo7UmO5+3IMEFud65EVi/z7s2N Zk5bRaxCnBEnA== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 1/8/2020 9:55 AM, Sowjanya Komatineni wrote: > mclk is from clk_out_1 which is part of Tegra PMC block and pmc clocks > are moved to Tegra PMC driver with pmc as clock provider and using pmc > clock ids. > > New device tree uses clk_out_1 from pmc clock provider. > > So, this patch adds implementation for mclk fallback to extern1 when > retrieving mclk returns -ENOENT to be backward compatible of new device > tree with older kernels. > > Tested-by: Dmitry Osipenko > Reviewed-by: Dmitry Osipenko > Signed-off-by: Sowjanya Komatineni > --- > sound/soc/tegra/tegra_asoc_utils.c | 11 ++++++++++- > 1 file changed, 10 insertions(+), 1 deletion(-) > > diff --git a/sound/soc/tegra/tegra_asoc_utils.c b/sound/soc/tegra/tegra_asoc_utils.c > index 9cfebef74870..9a5f81039491 100644 > --- a/sound/soc/tegra/tegra_asoc_utils.c > +++ b/sound/soc/tegra/tegra_asoc_utils.c > @@ -183,7 +183,16 @@ int tegra_asoc_utils_init(struct tegra_asoc_utils_data *data, > data->clk_cdev1 = devm_clk_get(dev, "mclk"); > if (IS_ERR(data->clk_cdev1)) { > dev_err(data->dev, "Can't retrieve clk cdev1\n"); This error print can be moved inside below if, when this actually meant to be an error condition. > - return PTR_ERR(data->clk_cdev1); > + if (PTR_ERR(data->clk_cdev1) != -ENOENT) > + return PTR_ERR(data->clk_cdev1); > + /* Fall back to extern1 */ > + data->clk_cdev1 = devm_clk_get(dev, "extern1"); > + if (IS_ERR(data->clk_cdev1)) { > + dev_err(data->dev, "Can't retrieve clk extern1\n"); > + return PTR_ERR(data->clk_cdev1); > + } > + > + dev_err(data->dev, "Falling back to extern1\n"); This can be a info print? > } > > /*