Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp231509ybl; Thu, 5 Dec 2019 18:49:58 -0800 (PST) X-Google-Smtp-Source: APXvYqxi4eJ25trpZySGgXzCBMyfpUgwpqbqWejQGrGAIKc+1Hjj6IXrq2KlQF1RwgHHHRSC9vVu X-Received: by 2002:a05:6830:1248:: with SMTP id s8mr9350425otp.202.1575600598629; Thu, 05 Dec 2019 18:49:58 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1575600598; cv=none; d=google.com; s=arc-20160816; b=vvDOHwe05wmv8TxfPzkLKtV4BZlThEJznHjqGyRTP+Sa1vMMHPhXOMNx5yCB5m4e9p elgFGJVjCule711+tuOmcgboJhnGH2n/3hF6y8zL64/1UM6WPgKCdAMf7z7o4yaxuf7q be9GgfcOXWuaothXqOKHOxXWC3svoPyNdWK/hF8Wyp8PIFlFMrjI7AnQUuP9mAySkUFs l7Ixom/U7zDRZj0ox7UnYqFXstEr4nb8pa4WGrnfOM7w7jHppZh2f2oNOwRHwrhZkl3o wG4JcWVrNeTZ+1FmT91+QQoGq3eyYnbGqxQXFNDltMhrFHMMm72V6aG1qqYjI6L8sbly T7HA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:dkim-signature:mime-version:references :in-reply-to:message-id:date:subject:cc:to:from; bh=QpuTCwWQ7OA+cLjLXqsb+rGtt5ndNflALwObfnlfPq8=; b=PSELax+XzKMb+VT4OQFA8wwQaDIEnHDQ8KpJS2+AgRGv/yiRQgvMGber6BQgriGVfB FefF9doosq3HJwQ39vzxGA8/a+SVRSpFWZFLRpdDgfwg2uxvu+nPV4EvnGTROEXBaFTz YzdJYHG/oPUedcdOVotXi7XvgzNsSfPZWCPuz3DjVW6yqIvKPY3AWlMsXIryJMiLCcOQ wIsiDFh3A9Ae/Z/UmQyTtu8/0978rGPzYzqVxootJ4uAUoqG5r3DONIke01vj8pHTK0D kZKlu2xKfZu/SUItnobsGaxA8Q1b40bB1Dm6uvhTWgU1B2yxVOkBMElfN3H/3nHD7Slu wF7Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nvidia.com header.s=n1 header.b=cojyUFS2; 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 81si6116722otj.236.2019.12.05.18.49.46; Thu, 05 Dec 2019 18:49:58 -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=cojyUFS2; 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 S1726879AbfLFCtM (ORCPT + 99 others); Thu, 5 Dec 2019 21:49:12 -0500 Received: from hqemgate16.nvidia.com ([216.228.121.65]:4492 "EHLO hqemgate16.nvidia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726822AbfLFCtL (ORCPT ); Thu, 5 Dec 2019 21:49:11 -0500 Received: from hqpgpgate102.nvidia.com (Not Verified[216.228.121.13]) by hqemgate16.nvidia.com (using TLS: TLSv1.2, DES-CBC3-SHA) id ; Thu, 05 Dec 2019 18:49:14 -0800 Received: from hqmail.nvidia.com ([172.20.161.6]) by hqpgpgate102.nvidia.com (PGP Universal service); Thu, 05 Dec 2019 18:49:10 -0800 X-PGP-Universal: processed; by hqpgpgate102.nvidia.com on Thu, 05 Dec 2019 18:49:10 -0800 Received: from HQMAIL101.nvidia.com (172.20.187.10) by HQMAIL111.nvidia.com (172.20.187.18) with Microsoft SMTP Server (TLS) id 15.0.1473.3; Fri, 6 Dec 2019 02:49:10 +0000 Received: from rnnvemgw01.nvidia.com (10.128.109.123) by HQMAIL101.nvidia.com (172.20.187.10) with Microsoft SMTP Server (TLS) id 15.0.1473.3 via Frontend Transport; Fri, 6 Dec 2019 02:49:10 +0000 Received: from skomatineni-linux.nvidia.com (Not Verified[10.2.163.171]) by rnnvemgw01.nvidia.com with Trustwave SEG (v7,5,8,10121) id ; Thu, 05 Dec 2019 18:49:09 -0800 From: Sowjanya Komatineni To: , , , , , , , , , CC: , , , , , , , , , , , , , , , , , , , , , , , Subject: [PATCH v3 09/15] ASoC: tegra: Add fallback for audio mclk Date: Thu, 5 Dec 2019 18:48:49 -0800 Message-ID: <1575600535-26877-10-git-send-email-skomatineni@nvidia.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1575600535-26877-1-git-send-email-skomatineni@nvidia.com> References: <1575600535-26877-1-git-send-email-skomatineni@nvidia.com> X-NVConfidentiality: public MIME-Version: 1.0 Content-Type: text/plain DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nvidia.com; s=n1; t=1575600555; bh=QpuTCwWQ7OA+cLjLXqsb+rGtt5ndNflALwObfnlfPq8=; h=X-PGP-Universal:From:To:CC:Subject:Date:Message-ID:X-Mailer: In-Reply-To:References:X-NVConfidentiality:MIME-Version: Content-Type; b=cojyUFS2tKje+kPVeDyds/3HD82HQ0sRmRNmatwG60gi6wlvjAU6NYzeJpS1NteMD 0sLPPn0JNbRGgsqjJlMCWPYpUe0LCvhXAVOtOfurLVVXMJt8gdnUQApnp2kl48r9X5 2y4E8YpWtNBqgqR3e52V9gxHA5hjDRV6nKNuZVYzlbuW10esyHWRJqqL/2Tgb23fLt 1qlxpQcWIH0v5o/quppnK1wQifJx55xGMVNUcMKrvHXZxwbUTe99w6NlFn4tDip921 n4i52QvZ6ltEpkNOeCRo8+wiTlkc68nczuD3y6iuNlIi65H+DSOgtoshje8X9Ht+/V j/1Raw4Xsg5hA== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 fallback to extern1 in case of retrieving mclk fails to be backward compatible of new device tree with older kernels. Cc: stable@vger.kernel.org Signed-off-by: Sowjanya Komatineni --- sound/soc/tegra/tegra_asoc_utils.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/sound/soc/tegra/tegra_asoc_utils.c b/sound/soc/tegra/tegra_asoc_utils.c index 8e3a3740df7c..f7408d5240c0 100644 --- a/sound/soc/tegra/tegra_asoc_utils.c +++ b/sound/soc/tegra/tegra_asoc_utils.c @@ -211,8 +211,14 @@ int tegra_asoc_utils_init(struct tegra_asoc_utils_data *data, data->clk_cdev1 = clk_get(dev, "mclk"); if (IS_ERR(data->clk_cdev1)) { dev_err(data->dev, "Can't retrieve clk cdev1\n"); - ret = PTR_ERR(data->clk_cdev1); - goto err_put_pll_a_out0; + data->clk_cdev1 = clk_get_sys("clk_out_1", "extern1"); + if (IS_ERR(data->clk_cdev1)) { + dev_err(data->dev, "Can't retrieve clk extern1\n"); + ret = PTR_ERR(data->clk_cdev1); + goto err_put_pll_a_out0; + } + + dev_err(data->dev, "Falling back to extern1\n"); } /* -- 2.7.4