Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp407633ybl; Tue, 7 Jan 2020 22:30:10 -0800 (PST) X-Google-Smtp-Source: APXvYqxbFlfrIGpYV5SVeVInQzaRRm8jN8XtiiCqEvNsRv9SoEyYUxUfYIYqYP1HWolWFEVpyhrv X-Received: by 2002:aca:6744:: with SMTP id b4mr1934926oiy.99.1578465010546; Tue, 07 Jan 2020 22:30:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1578465010; cv=none; d=google.com; s=arc-20160816; b=eR5y+iX84u2UPgEYerqSXxmg0dbyTJdzFWApql8FTB7kVbKv/Mv3OeYe7v8ktwDlhn goryvY+CrZaUs2/rE30H+/Np+O9fdWOvhLNNnp1BKcB0i7PwTZo1EiDlgV6ivOaw6Gmc 4/Sojl3wquahgLEJgatyi5Tt0tGRzuAPhVg553AiTwJnYFCXl7p/2WnLlM4/c3NUkWUW EUqAAUCz1lcadJCIeJK4ayyl3F/XEisrxZqdSZOTwNTPPulr8hoUKCZgMbrfoaOLFEZR QBTEzSKpjyvDIKj6jNuz2wcM2Utp+yrcrAmEJEDCG+YrNoGXzZToLkBC6nqoT1PaMqXH BHUg== 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=OHhIle+XKX/LTcA5mmunIMXF7a5LS6VUkkqyvI0+XNg=; b=XJvaj0PJX83zlcwF0lD2z0dEotjgRv8IDuNy6hVL5LHQOF0mexs0sT91nqUVdv06dz dsHBao/OTDzlmDjAqPbFK+7gmsCde655eKze+/Q/LGcOdxOvFfrTDJm+YgL5OZ7ns286 vdQkVsuMY/mNfkCmU2KQmTMCFRu9Jj/Va5YLcTUwbntuGaK3rybkGfeQui2b/+NmOUJp pRKuqJ58GsDqLNunjkBn9sPxA66SFvKazpOsepTTH28SoFMel6e1Qn/WswnlQ8jgKtXT vf004CqZg+6qPcwQfUDWFlte3ZQelOiPgyU+Dt9STL+a/bsp1ukZF16axSCUrfovMQNA ugJw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nvidia.com header.s=n1 header.b=ZNR7SZJg; 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 x207si1309544oif.30.2020.01.07.22.29.56; Tue, 07 Jan 2020 22:30:10 -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=ZNR7SZJg; 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 S1726290AbgAHG3G (ORCPT + 99 others); Wed, 8 Jan 2020 01:29:06 -0500 Received: from hqnvemgate24.nvidia.com ([216.228.121.143]:15810 "EHLO hqnvemgate24.nvidia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725773AbgAHG3G (ORCPT ); Wed, 8 Jan 2020 01:29:06 -0500 Received: from hqpgpgate101.nvidia.com (Not Verified[216.228.121.13]) by hqnvemgate24.nvidia.com (using TLS: TLSv1.2, DES-CBC3-SHA) id ; Tue, 07 Jan 2020 22:28:16 -0800 Received: from hqmail.nvidia.com ([172.20.161.6]) by hqpgpgate101.nvidia.com (PGP Universal service); Tue, 07 Jan 2020 22:29:05 -0800 X-PGP-Universal: processed; by hqpgpgate101.nvidia.com on Tue, 07 Jan 2020 22:29:05 -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 06:28:59 +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:58:56 +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: X-Originating-IP: [10.124.1.5] X-ClientProxiedBy: HQMAIL105.nvidia.com (172.20.187.12) 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-GB DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nvidia.com; s=n1; t=1578464897; bh=OHhIle+XKX/LTcA5mmunIMXF7a5LS6VUkkqyvI0+XNg=; 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=ZNR7SZJgFRYaRAx4eRFJT2uN5zQzJqxtOI2lcGNIlSwFBmAEIBNAWOaBMHMhyLs39 AYBer1uvKCm9U/ZUrwjhcjhAATw3Je5U+v7ubgsWf+mEAd9sC3SBG6IY/bvaXTTlra Vc8vOpPasi+ZKzgw+3nhm0VZmYV5OZ89xt3Vi6as2nlt5/CIiMlhzhJrtlEn4eKsLC eMObyYS7kHlRN6oTWH8yCSmnodXewyv7fsEDrzsrdBD0JAVIUwrqV6+iqhkiQcVzIP hlLgZOiOtDl28knHeiGM7iEYvRGtjq9YyY403f4bVVEsdJ3TjVaSBrNbnU6TDZnUJ3 nXcH7t0bhalBQ== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 1/8/2020 11:18 AM, Sowjanya Komatineni wrote: > > 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, "m= clk"); >>> =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->de= v, "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=20 > extern1. Yes, but falling back essentially means 'mclk' is not available and=20 fallback print is not an error. Not a major issue though, you can consider updating. Otherwise LGTM. >>> -=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 return PTR_ERR(data->clk_cd= ev1); >>> +=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 ret= urn 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_cl= k_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 ret= urn 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 /*