From patchwork Tue Sep 19 13:46:13 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Brown X-Patchwork-Id: 112988 Delivered-To: patch@linaro.org Received: by 10.140.106.117 with SMTP id d108csp4938708qgf; Tue, 19 Sep 2017 06:48:11 -0700 (PDT) X-Google-Smtp-Source: AOwi7QCjRlDD031MIfM+Nckj+pqZEo6QkBlvG6YJb9ScTBDW0is19vJuwJSgPOgSDJeL+9K+wRuW X-Received: by 10.223.135.141 with SMTP id b13mr1533011wrb.6.1505828891169; Tue, 19 Sep 2017 06:48:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1505828891; cv=none; d=google.com; s=arc-20160816; b=g51bE7z1oOOsDroX1l/XzF0iBSrj9jHUoZ5kNe7PZ1+exo4jQq9eWljqUzXYpqiGxF vBm5ZXdZOSHddjWbB5UxJozsy+PtCynE/ZfdxWARqnf5cq281A5vmh7NOXOI3CICW+7f Cs73sieh6cxzzd+dJkx+bN1r5N2+Mbj4MCAgJg/8IWArGV+0WbIiBXDF7Bq6wwb3D8EI Aw1L7RGLJ7NORXNd6BVl+yZ0l8R89i7qocnZ8TaXLrDyF5LA6P5dckaEraWhFQuPlMXV vkuPNuqGpRBnjnGbaQczh1IjWVP5JLMrAntEdY/yfGiHcVJPBeKQjFViEOLFJnVmwIxr cdDQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:cc:date:message-id:in-reply-to:to:from :dkim-signature:delivered-to:arc-authentication-results; bh=/Ux3KqLtgcQUBMydAxMVCVyzlDyGV0vshWgIncfICKg=; b=t+3MRWj31PE91XkO1qlWSQQSwf3HaIlGO2cVVhxI84r76Cb4f2+Nih8Ort8Fjj+eDp Hg/QKeke/TjezeZLHL14VGFPJDBSFi6pDO+S/zfMJN+t5DXGgfUs9ALxrQ/WB8Z6p/4k dDKt4dRwMLZVT2bD/S+Pzjbm1iQ/k+MxKx7al1yPCJ+gNsaKp86wwhCBE4pMTeD/SziK idrhZQTiK9l4k17ngcrz85OgeTF3Q4pRK4YC5d0b96gfRBqw2Iu5sh8YpFmfvhOaxJcn 31vLKmgZ2DQ7kkjb1jSpoB9uXJJhadmQ+L8PFrpaCONHcs7d+kT6qFubLxvNq7db9330 g9BQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@sirena.org.uk header.s=20170815-heliosphere header.b=QmrGU2+4; spf=pass (google.com: domain of alsa-devel-bounces@alsa-project.org designates 77.48.224.243 as permitted sender) smtp.mailfrom=alsa-devel-bounces@alsa-project.org Return-Path: Received: from alsa0.perex.cz (alsa0.perex.cz. [77.48.224.243]) by mx.google.com with ESMTP id f37si8076828wrf.171.2017.09.19.06.48.10; Tue, 19 Sep 2017 06:48:11 -0700 (PDT) Received-SPF: pass (google.com: domain of alsa-devel-bounces@alsa-project.org designates 77.48.224.243 as permitted sender) client-ip=77.48.224.243; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@sirena.org.uk header.s=20170815-heliosphere header.b=QmrGU2+4; spf=pass (google.com: domain of alsa-devel-bounces@alsa-project.org designates 77.48.224.243 as permitted sender) smtp.mailfrom=alsa-devel-bounces@alsa-project.org Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id F3F95267419; Tue, 19 Sep 2017 15:46:29 +0200 (CEST) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa0.perex.cz (Postfix, from userid 1000) id 7D195267418; Tue, 19 Sep 2017 15:46:28 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on mail1.perex.cz X-Spam-Level: X-Spam-Status: No, score=0.7 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, SPF_NEUTRAL autolearn=disabled version=3.4.0 Received: from heliosphere.sirena.org.uk (heliosphere.sirena.org.uk [172.104.155.198]) by alsa0.perex.cz (Postfix) with ESMTP id E797326737E for ; Tue, 19 Sep 2017 15:46:15 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sirena.org.uk; s=20170815-heliosphere; h=Date:Message-Id:In-Reply-To: Subject:Cc:To:From:Sender:Reply-To:MIME-Version:Content-Type: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:References: List-Id:List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner: List-Archive; bh=gu6PduisP4Z1WoaaGM9TFqm6RGZOKh1weqFXygPfkQs=; b=QmrGU2+4FCI6 iN/Bm1phLyqJwCpOlr+Rz0ARM52q+EF7cnidwV9eRArGFHn5Z5QQ5IMRWRgLsp64UzQXzXr36ZMdl CnxB6/HuOnW4fhcq4/DTevMgN0gObiexiL9R9gZsMnQO6bCScnVr2uLvOjFkZRif54aBZ7wDqu6aT SsBk0=; Received: from debutante.sirena.org.uk ([2001:470:1f1d:6b5::3] helo=debutante) by heliosphere.sirena.org.uk with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1duIqr-0001Nr-E4; Tue, 19 Sep 2017 13:46:13 +0000 Received: from broonie by debutante with local (Exim 4.89) (envelope-from ) id 1duIqr-0008B3-0G; Tue, 19 Sep 2017 14:46:13 +0100 From: Mark Brown To: Pierre-Louis Bossart In-Reply-To: <20170908174356.23788-2-pierre-louis.bossart@linux.intel.com> Message-Id: Date: Tue, 19 Sep 2017 14:46:13 +0100 Cc: alsa-devel@alsa-project.org, tiwai@suse.de, liam.r.girdwood@linux.intel.com, vinod.koul@intel.com, broonie@kernel.org, andriy.shevchenko@linux.intel.com Subject: [alsa-devel] Applied "ASoC: Intel: boards: use devm_clk_get() unconditionally" to the asoc tree X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org The patch ASoC: Intel: boards: use devm_clk_get() unconditionally has been applied to the asoc tree at git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted. You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed. If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced. Please add any relevant lists and maintainers to the CCs when replying to this mail. Thanks, Mark >From 7735bce05a9c0bb0eb0f08c9002d65843a7c5798 Mon Sep 17 00:00:00 2001 From: Pierre-Louis Bossart Date: Fri, 8 Sep 2017 12:43:52 -0500 Subject: [PATCH] ASoC: Intel: boards: use devm_clk_get() unconditionally The clock framework was only used in Baytrail, on Cherrytrail the firmware takes care of the MCLK/plt_clk_3. With the fix in 'commit d31fd43c0f9a ("clk: x86: Do not gate clocks enabled by the firmware")' the firmware-managed clocks are not impacted by enable/disable requests make at the driver level, and the rates are identical. Remove all checks for Baytrail and use devm_clk_get() unconditionally. Tested on Asus T100HA (CHT) and Asus T100TAF (BYT) Note that the RT5640 and RT5645 machine drivers need to keep some checks for Valleyview to check for Baytrail-CR. Reviewed-by: Andy Shevchenko Signed-off-by: Pierre-Louis Bossart Acked-By: Vinod Koul Signed-off-by: Mark Brown --- sound/soc/intel/boards/bytcr_rt5640.c | 2 +- sound/soc/intel/boards/cht_bsw_rt5645.c | 14 ++++++-------- sound/soc/intel/boards/cht_bsw_rt5672.c | 27 ++++++--------------------- 3 files changed, 13 insertions(+), 30 deletions(-) -- 2.14.1 _______________________________________________ Alsa-devel mailing list Alsa-devel@alsa-project.org http://mailman.alsa-project.org/mailman/listinfo/alsa-devel diff --git a/sound/soc/intel/boards/bytcr_rt5640.c b/sound/soc/intel/boards/bytcr_rt5640.c index 4a76b099a508..15b1e292b0c3 100644 --- a/sound/soc/intel/boards/bytcr_rt5640.c +++ b/sound/soc/intel/boards/bytcr_rt5640.c @@ -891,7 +891,7 @@ static int snd_byt_rt5640_mc_probe(struct platform_device *pdev) byt_rt5640_cpu_dai_name; } - if ((byt_rt5640_quirk & BYT_RT5640_MCLK_EN) && (is_valleyview())) { + if (byt_rt5640_quirk & BYT_RT5640_MCLK_EN) { priv->mclk = devm_clk_get(&pdev->dev, "pmc_plt_clk_3"); if (IS_ERR(priv->mclk)) { ret_val = PTR_ERR(priv->mclk); diff --git a/sound/soc/intel/boards/cht_bsw_rt5645.c b/sound/soc/intel/boards/cht_bsw_rt5645.c index 5bcde01d15e6..d553e2b67c92 100644 --- a/sound/soc/intel/boards/cht_bsw_rt5645.c +++ b/sound/soc/intel/boards/cht_bsw_rt5645.c @@ -682,14 +682,12 @@ static int snd_cht_mc_probe(struct platform_device *pdev) cht_rt5645_cpu_dai_name; } - if (is_valleyview()) { - drv->mclk = devm_clk_get(&pdev->dev, "pmc_plt_clk_3"); - if (IS_ERR(drv->mclk)) { - dev_err(&pdev->dev, - "Failed to get MCLK from pmc_plt_clk_3: %ld\n", - PTR_ERR(drv->mclk)); - return PTR_ERR(drv->mclk); - } + drv->mclk = devm_clk_get(&pdev->dev, "pmc_plt_clk_3"); + if (IS_ERR(drv->mclk)) { + dev_err(&pdev->dev, + "Failed to get MCLK from pmc_plt_clk_3: %ld\n", + PTR_ERR(drv->mclk)); + return PTR_ERR(drv->mclk); } snd_soc_card_set_drvdata(card, drv); diff --git a/sound/soc/intel/boards/cht_bsw_rt5672.c b/sound/soc/intel/boards/cht_bsw_rt5672.c index f597d5582223..a0e60bc1f84f 100644 --- a/sound/soc/intel/boards/cht_bsw_rt5672.c +++ b/sound/soc/intel/boards/cht_bsw_rt5672.c @@ -20,7 +20,6 @@ #include #include #include -#include #include #include #include @@ -394,18 +393,6 @@ static struct snd_soc_card snd_soc_card_cht = { .resume_post = cht_resume_post, }; -static bool is_valleyview(void) -{ - static const struct x86_cpu_id cpu_ids[] = { - { X86_VENDOR_INTEL, 6, 55 }, /* Valleyview, Bay Trail */ - {} - }; - - if (!x86_match_cpu(cpu_ids)) - return false; - return true; -} - #define RT5672_I2C_DEFAULT "i2c-10EC5670:00" static int snd_cht_mc_probe(struct platform_device *pdev) @@ -439,14 +426,12 @@ static int snd_cht_mc_probe(struct platform_device *pdev) } } - if (is_valleyview()) { - drv->mclk = devm_clk_get(&pdev->dev, "pmc_plt_clk_3"); - if (IS_ERR(drv->mclk)) { - dev_err(&pdev->dev, - "Failed to get MCLK from pmc_plt_clk_3: %ld\n", - PTR_ERR(drv->mclk)); - return PTR_ERR(drv->mclk); - } + drv->mclk = devm_clk_get(&pdev->dev, "pmc_plt_clk_3"); + if (IS_ERR(drv->mclk)) { + dev_err(&pdev->dev, + "Failed to get MCLK from pmc_plt_clk_3: %ld\n", + PTR_ERR(drv->mclk)); + return PTR_ERR(drv->mclk); } snd_soc_card_set_drvdata(&snd_soc_card_cht, drv);