Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp1214186ybl; Fri, 10 Jan 2020 14:14:51 -0800 (PST) X-Google-Smtp-Source: APXvYqy/YT0wSACo4P8/8I+GlY7lJ8DZefsjFSVPOOjfcitzoOK1DCMmn0dCzt1osFZMWyOsWFNp X-Received: by 2002:a05:6830:1116:: with SMTP id w22mr4521134otq.63.1578694491523; Fri, 10 Jan 2020 14:14:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1578694491; cv=none; d=google.com; s=arc-20160816; b=vbO6qr/VYAWmxq4bupZ1g57HGGg4WGFmD/U89VyGY8KGJlfHaQmvJr87J4N7aKfL7s 6yMhxlJiAv5uG60q8AVmnEKGQ+AskCPKx6t11zXT6s9rt7uabISkq7jd8yJBCVo9TsXL Wc/IyJPhzD+hogumqL5rEJfb3WAmPXZEjQ9qwzXuwhaFuIlE8Uqwmuo0+bAXVx+yzSty 7knr0cqvpYtoQEWzUZaMQkLFxPTJooZEOQVwjXwMJClPunOgk0pwNXzE35EtY0F/1xjw A8ZtYk+dW3y9Wk4s4JtW81BABVyqG+gp+s3ey2ysCYP0CUuNRwSnngmvQqt/i80UXCot VrKw== 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=2gkT3tMLxYwyOI9Jl1S9GbWxm3s4X8H8VJ7ik1MXyoA=; b=iZQCb+3XQV6djxxghBSfy9pb7C8nxKudK2njG+A/vokiRYeCRhxYVEkaWtwZ/Iryf9 dqORyRw7vAlgSYC3RrSHG0535nhoWtRDwrp2LNskE8wi3yrW2zG2XoVDyivuRAjaXWpu AxQ+zuQvy7eLH1sNBvISVrwqzGIa0O3tEbqqfsN2SXoPViGi7dyuC+SV8QAIFtPS2cPA PbMfq8RXfWDYKli6p7HighvhhMqoBbziw8CSPgHyiR3u31SztxxEuwofuxWnoScaOg9U 6xI72fKvJGKkXu1CVzvynSQZySoNaZrYJ61JbfUmSb43zvzqj6qzWZwOkNMZkTKJDt2Y 2CVA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nvidia.com header.s=n1 header.b=r98heYA0; 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 c21si2727420oth.174.2020.01.10.14.14.39; Fri, 10 Jan 2020 14:14:51 -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=r98heYA0; 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 S1727319AbgAJWNp (ORCPT + 99 others); Fri, 10 Jan 2020 17:13:45 -0500 Received: from hqnvemgate26.nvidia.com ([216.228.121.65]:10305 "EHLO hqnvemgate26.nvidia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727229AbgAJWNp (ORCPT ); Fri, 10 Jan 2020 17:13:45 -0500 Received: from hqpgpgate101.nvidia.com (Not Verified[216.228.121.13]) by hqnvemgate26.nvidia.com (using TLS: TLSv1.2, DES-CBC3-SHA) id ; Fri, 10 Jan 2020 14:13:26 -0800 Received: from hqmail.nvidia.com ([172.20.161.6]) by hqpgpgate101.nvidia.com (PGP Universal service); Fri, 10 Jan 2020 14:13:44 -0800 X-PGP-Universal: processed; by hqpgpgate101.nvidia.com on Fri, 10 Jan 2020 14:13:44 -0800 Received: from [10.2.160.1] (10.124.1.5) by HQMAIL107.nvidia.com (172.20.187.13) with Microsoft SMTP Server (TLS) id 15.0.1473.3; Fri, 10 Jan 2020 22:13:43 +0000 Subject: Re: [PATCH v7 15/21] ASoC: tegra: Add fallback implementation for audio mclk To: Dmitry Osipenko , Sameer Pujar , , , , , , , , , , , CC: , , , , , , , , , References: <1578457515-3477-1-git-send-email-skomatineni@nvidia.com> <1578457515-3477-16-git-send-email-skomatineni@nvidia.com> <745b8c7b-4fe3-c9ea-284e-b89546e8ad87@nvidia.com> <705edf9b-d1bc-8090-017e-fa4ad445f9fb@nvidia.com> <135f0c0b-86d1-9b1a-af02-c14c4b5308c4@gmail.com> From: Sowjanya Komatineni Message-ID: <575aa30e-1b5a-2a2d-5893-3f6832f416f1@nvidia.com> Date: Fri, 10 Jan 2020 14:13:42 -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: <135f0c0b-86d1-9b1a-af02-c14c4b5308c4@gmail.com> 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-US DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nvidia.com; s=n1; t=1578694406; bh=2gkT3tMLxYwyOI9Jl1S9GbWxm3s4X8H8VJ7ik1MXyoA=; 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=r98heYA0mgWJMM7cxOmYtXFUe/SUO8nBYkvD8RFzN75yxHfwCro5N/26m0Q4Kthbo taSjL+fkp5qmsLhaeib7B1DgpcQPdPulDvkawBOxVb4f6pVMOreJvS5U8dlskzP0Yb 3OaVvsPSHsO+1VMVPImCytt6SVTCMUm2ZLbxpl41V/dgSi4vxwZ+2MWcyi/zyB/MIs d/ZxdT0RIeVWQTsUYAi+YO1fEmCA/Bic8duqn9egyfmACnOPqWlIHZ6QLDVxRzoUlM xedxgQ/GDRfpkmtOyfQhRtjzkN8ofhV75Fajgejd9tLh7IPJouR+plxhE/66feLx8f ZXR4WaiaklikQ== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 1/10/20 2:05 PM, Dmitry Osipenko wrote: > External email: Use caution opening links or attachments > > > 10.01.2020 20:04, Sowjanya Komatineni =D0=BF=D0=B8=D1=88=D0=B5=D1=82: >> On 1/9/20 10:52 AM, Sowjanya Komatineni wrote: >>> >>> On 1/7/20 10:28 PM, Sameer Pujar wrote: >>>> 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 whe= n >>>>>>> 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 =3D 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. >>>>>> >>>>> Want to show error even if mclk retrieval returns ENOENT to clearly >>>>> indicate mclk does not exist along with message of falling back to >>>>> extern1. >>>> Yes, but falling back essentially means 'mclk' is not available and >>>> fallback print is not an error. >>>> Not a major issue though, you can consider updating. Otherwise LGTM. >>>> >>> Will update >>>>>>> - return PTR_ERR(data->clk_cdev1); >>>>>>> + if (PTR_ERR(data->clk_cdev1) !=3D -ENOENT) >>>>>>> + return PTR_ERR(data->clk_cdev1); >>>>>>> + /* Fall back to extern1 */ >>>>>>> + data->clk_cdev1 =3D 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? >>> Will use dev_info >>>>>>> } >>>>>>> /* >>> Dmitry/Rob, there was discussion in v3 regarding backporting mclk >>> fallback. >>> >>> Dmitry wanted Rob to confirm on this >>> >>> I think openSUSE Leap could be one of those distros that use LTS kernel >>> with newer device-trees, but that's not 100%. Maybe Rob could help >>> clarifying that. >>> >>> Dmitry/Rob, Can you please confirm if mclk fallback patch need >>> backport to have new device tree work with old kernels? >>> >> Dmitry, >> >> Can you please confirm if we need to backport this mclk fallback patch? >> > Seems only T210 was making use of the CaR's TEGRA*_CLK_CLK_OUT_*, thus > the backporting isn't needed. Thanks Dmitry > > Also, please use 'git rebase --exec make ...' to make sure that all > patches are compiling without problems. The removal of the legacy clock > IDs should be done after the device-trees changes, otherwise it looks > like DTBs compilation will fail. It's possible that the order of the > patches could be changed if Thierry will chose to split this series into > several pull requests, nevertheless all patches should compile and work > in the original order. OK, Will move patches of device tree updates to use new DT ID prior to=20 removal of old ID.