Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp380432ybl; Tue, 7 Jan 2020 21:48:58 -0800 (PST) X-Google-Smtp-Source: APXvYqyFbmHzSfvAlgG7TnEjdCrE4/6qwU0nP1hyufGYyCA3DRruER8NMKx6nF9TKl9k5YAO9QfY X-Received: by 2002:a05:6830:109a:: with SMTP id y26mr2729736oto.227.1578462537886; Tue, 07 Jan 2020 21:48:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1578462537; cv=none; d=google.com; s=arc-20160816; b=fgg6REFp5xchYFBeEbFMUSbT2addkmSszyd7Oh7G2o4IDTvUy8T+b6Q3SZ/mFOaPuK DxpfG+h67zb/VKFdyiETX0UGO+7/wAZyb6ymNXsEAtr4d+w2SoTuFdudZJgi8XLXn4A2 fJ1kXkYC/JsOzZ+2pcfOzrdcwwoMT8fNdnVuHD60GdCgzFlO18KbMd3VX+7Lic+p89cf NlptdILpLL0ilqhm48HeTeZBIDhNNTBCv7anY4VU3VVPjd/9KSaDO6CY54MPe1T4eQ3S 9Plbedti2L+nilgj0fEx3ertU9eSAb1wKfZwLnibNwNhr0Wv+saOoGm/6c+WCaSgqkY0 0pxw== 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=GQANHx+miKT/xFnjFw8SvljwDPz/I599x2UEzMokWfU=; b=wuXsIVTPaQtK7EIstCgwbFyly9GLc7c4GM3Q4Rc8friUiIsU8gpYrqYZIyaTNJdk49 fholGhTsMV2VK/2DT9yA1IdkmbiqcOaUmpjeV/GDJLiKAkU+TN3frSZTK6QwCtUenslu OKiAU2nnj+ho229NBONk7L3Vhh3uD09/2TosY2gVSk3yGaqF2p8losRKL2yHsjg+UgNd 6az84JXuD9/KXyPWjHh4gwgrvlq2TdLn+Vr1YSWy1q9eUl3dwStaXjZGc6uhfhXEg1JS LzKUaEi5MO9xG8+TdoobcmdvQqzTIxEeOVdWtev1LA5EknwAZxvwuRKE/D1XY6wDWFHD Pkag== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nvidia.com header.s=n1 header.b=aV98CB9Q; 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 g26si1348989otk.324.2020.01.07.21.48.45; Tue, 07 Jan 2020 21:48:57 -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=aV98CB9Q; 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 S1726144AbgAHFsE (ORCPT + 99 others); Wed, 8 Jan 2020 00:48:04 -0500 Received: from hqnvemgate26.nvidia.com ([216.228.121.65]:16367 "EHLO hqnvemgate26.nvidia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725774AbgAHFsE (ORCPT ); Wed, 8 Jan 2020 00:48:04 -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:47:46 -0800 Received: from hqmail.nvidia.com ([172.20.161.6]) by hqpgpgate101.nvidia.com (PGP Universal service); Tue, 07 Jan 2020 21:48:03 -0800 X-PGP-Universal: processed; by hqpgpgate101.nvidia.com on Tue, 07 Jan 2020 21:48:03 -0800 Received: from [10.2.162.131] (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:48:01 +0000 Subject: Re: [PATCH v7 15/21] ASoC: tegra: Add fallback implementation for audio mclk To: Sameer Pujar , , , , , , , , , , , , CC: , , , , , , , , , References: <1578457515-3477-1-git-send-email-skomatineni@nvidia.com> <1578457515-3477-16-git-send-email-skomatineni@nvidia.com> From: Sowjanya Komatineni Message-ID: Date: Tue, 7 Jan 2020 21:48:00 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.7.2 MIME-Version: 1.0 In-Reply-To: X-Originating-IP: [10.124.1.5] X-ClientProxiedBy: HQMAIL101.nvidia.com (172.20.187.10) To HQMAIL107.nvidia.com (172.20.187.13) Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: quoted-printable Content-Language: en-US DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nvidia.com; s=n1; t=1578462466; bh=GQANHx+miKT/xFnjFw8SvljwDPz/I599x2UEzMokWfU=; 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=aV98CB9QC8JyG8GXOwpMrLT8QNkMj+OOzED8H0aLx8mhQ/t5Pu0P3tTV3m9Y7dMK9 rc2TJY1XEY1p7bryNhFFUPUuZctVQD3Sl0U4YIxfKqqxnS7Mzil7c9j0TeRwbUdc6l eSlt1xo2llXnImNXhMu909wTqeDrAndEVyKVg5iNF9a349q2nD9A/OzRzLpX1CcabZ BTFLofk0Lkc0fYOuX90fm5hQzvfquwO1t9w4vjDx26I5jK7dy0CH8uG2cHqCCytxGN rW7yqReLPD7SST6+PpEvs1qwbeD9J9vLfHDZRkoWcIF/MWOusKNRGnN05jA+w1oaly tcYMJ/hLYqx/Q== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 1/7/20 9:34 PM, Sameer Pujar wrote: > > 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 >> --- >> =C2=A0 sound/soc/tegra/tegra_asoc_utils.c | 11 ++++++++++- >> =C2=A0 1 file changed, 10 insertions(+), 1 deletion(-) >> >> diff --git a/sound/soc/tegra/tegra_asoc_utils.c=20 >> 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=20 >> tegra_asoc_utils_data *data, >> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 data->clk_cdev1 =3D devm_clk_get(dev, "mc= lk"); >> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 if (IS_ERR(data->clk_cdev1)) { >> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 dev_err(data->dev= , "Can't retrieve clk cdev1\n"); > > This error print can be moved inside below if, when this actually=20 > meant to be an error condition. > Want to show error even if mclk retrieval returns ENOENT to clearly=20 indicate mclk does not exist along with message of falling back to extern1. >> -=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 return PTR_ERR(data->clk_cde= v1); >> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 if (PTR_ERR(data->clk_cdev1)= !=3D -ENOENT) >> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 retu= rn PTR_ERR(data->clk_cdev1); >> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 /* Fall back to extern1 */ >> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 data->clk_cdev1 =3D devm_clk= _get(dev, "extern1"); >> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 if (IS_ERR(data->clk_cdev1))= { >> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 dev_= err(data->dev, "Can't retrieve clk extern1\n"); >> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 retu= rn PTR_ERR(data->clk_cdev1); >> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 } >> + >> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 dev_err(data->dev, "Falling = back to extern1\n"); > > This can be a info print? >> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 } >> =C2=A0 =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 /*