From patchwork Fri Mar 25 15:42:39 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Brown X-Patchwork-Id: 554395 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id A02E9C433F5 for ; Fri, 25 Mar 2022 15:45:02 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id D8A9D173D; Fri, 25 Mar 2022 16:44:10 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz D8A9D173D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1648223100; bh=ASmJnaDdZ+Nyaj2PA95nJQlZZOD2sgjozfnZ23JhTNE=; h=From:To:Subject:Date:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=dQWFTLQzEPStPYbdMxMPAJYtY5vomQhQW+uLdYM/A/J1jwYIZuREUnbAy+hcK8Jnj Bg1pmySVUj2h64q4BJaUpRGZ0ncNNwpWbb2DWUGzSD8u79nEVfuz/BBz+1hK0kzcKO rWS2e4yf1MdB48XBUL3Zey8Q+XTfGb5d2jlwRWOQ= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 8051FF800F4; Fri, 25 Mar 2022 16:43:39 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id E7BB0F804CC; Fri, 25 Mar 2022 16:43:37 +0100 (CET) Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 0CA63F800AA for ; Fri, 25 Mar 2022 16:43:33 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 0CA63F800AA Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="qmFNLwT2" Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 5F68D6183D; Fri, 25 Mar 2022 15:43:32 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2EB11C340F3; Fri, 25 Mar 2022 15:43:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1648223012; bh=ASmJnaDdZ+Nyaj2PA95nJQlZZOD2sgjozfnZ23JhTNE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=qmFNLwT2aQ7ATezL7JLhiX+Yk8HY7/uMzEiE8L1fTHXrYntjaV2KGMu0vXkx2GgqA D1Ja/Sk8Wi11U65ODaI11Mzg2ABi7Lfn8Z5Iu7UXKIoEm4TmcUQl60d3sC4R6N7lka WFwHOSHgg8RfqiY0jUNZH/uOoDd31peUFLGumXRTkZHJaFsM5JKz1PITh9+oUPthZX k8f7g/KG9tKsxs4VBEu9P6webwVi/G8cTugyIdcFofZ5tk6juZkBZQoO26ElqGcRa+ uqPvHuXDCok43D9Qw79MB5Bhm+JvTyZMzQ/xGTP08JKaC5leXeyz5AjNh5hCIz9g2K hXTF2L9+sNqtw== From: Mark Brown To: Liam Girdwood , Codrin Ciubotariu Subject: [PATCH v1 1/3] ASoC: atmel: Remove system clock tree configuration for at91sam9g20ek Date: Fri, 25 Mar 2022 15:42:39 +0000 Message-Id: <20220325154241.1600757-2-broonie@kernel.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220325154241.1600757-1-broonie@kernel.org> References: <20220325154241.1600757-1-broonie@kernel.org> MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=3790; h=from:subject; bh=ASmJnaDdZ+Nyaj2PA95nJQlZZOD2sgjozfnZ23JhTNE=; b=owEBbQGS/pANAwAKASTWi3JdVIfQAcsmYgBiPeLvfsokRHH+Pq1/L8yPPh4M5ejpNCXJFDXGeth7 DK1WvEWJATMEAAEKAB0WIQSt5miqZ1cYtZ/in+ok1otyXVSH0AUCYj3i7wAKCRAk1otyXVSH0In7B/ 9pzbpPKTUvOFRP1y3AIyMSnDc5NF4Fh4OXe+UthQd++yu8tyQFhqwkHidrDgqwhXocNrcH2IpJ3L6N 9R+8QJ41+9Tv986mtbLkrhzMsjCIZupuukkagw5EW5CIU32nRfHrmDPRB7LRKOeDvLY3oeAuFlefkL sUUFNnasv7Efflt/3D4/gqn1QhyyDTiyWA/oYuInCDw2u3EcnyliVNIP0C9dk4C1nfdBSGN/vCblVe 3BZLj2pgar0jr/j+RcPo5Hf4wIKfoXhwyNWS8pCIPizSb0f7CgNvrL16QO9MnS73tCxHxqUxYHcMSu wwHJxznfY87d+kuS8uPplBfP3Hou2i X-Developer-Key: i=broonie@kernel.org; a=openpgp; fpr=3F2568AAC26998F9E813A1C5C3F436CA30F5D8EB Cc: alsa-devel@alsa-project.org, Mark Brown X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 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: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" The MCLK of the WM8731 on the AT91SAM9G20-EK board is connected to the PCK0 output of the SoC, intended in the reference software to be supplied using PLLB and programmed to 12MHz. As originally written for use with a board file the audio driver was responsible for configuring the entire tree but in the conversion to the common clock framework the registration of the named pck0 and pllb clocks was removed so the driver has failed to instantiate ever since. Since the WM8731 driver has had support for managing a MCLK provided via the common clock framework for some time we can simply drop all the clock management code from the machine driver other than configuration of the sysclk rate, the CODEC driver still respects that configuration from the machine driver. Fixes: ff78a189b0ae55f ("ARM: at91: remove old at91-specific clock driver") Signed-off-by: Mark Brown Reviewed-by: Codrin Ciubotariu --- sound/soc/atmel/sam9g20_wm8731.c | 61 -------------------------------- 1 file changed, 61 deletions(-) diff --git a/sound/soc/atmel/sam9g20_wm8731.c b/sound/soc/atmel/sam9g20_wm8731.c index 33e43013ff77..0d639a33ad96 100644 --- a/sound/soc/atmel/sam9g20_wm8731.c +++ b/sound/soc/atmel/sam9g20_wm8731.c @@ -46,35 +46,6 @@ */ #undef ENABLE_MIC_INPUT -static struct clk *mclk; - -static int at91sam9g20ek_set_bias_level(struct snd_soc_card *card, - struct snd_soc_dapm_context *dapm, - enum snd_soc_bias_level level) -{ - static int mclk_on; - int ret = 0; - - switch (level) { - case SND_SOC_BIAS_ON: - case SND_SOC_BIAS_PREPARE: - if (!mclk_on) - ret = clk_enable(mclk); - if (ret == 0) - mclk_on = 1; - break; - - case SND_SOC_BIAS_OFF: - case SND_SOC_BIAS_STANDBY: - if (mclk_on) - clk_disable(mclk); - mclk_on = 0; - break; - } - - return ret; -} - static const struct snd_soc_dapm_widget at91sam9g20ek_dapm_widgets[] = { SND_SOC_DAPM_MIC("Int Mic", NULL), SND_SOC_DAPM_SPK("Ext Spk", NULL), @@ -135,7 +106,6 @@ static struct snd_soc_card snd_soc_at91sam9g20ek = { .owner = THIS_MODULE, .dai_link = &at91sam9g20ek_dai, .num_links = 1, - .set_bias_level = at91sam9g20ek_set_bias_level, .dapm_widgets = at91sam9g20ek_dapm_widgets, .num_dapm_widgets = ARRAY_SIZE(at91sam9g20ek_dapm_widgets), @@ -148,7 +118,6 @@ static int at91sam9g20ek_audio_probe(struct platform_device *pdev) { struct device_node *np = pdev->dev.of_node; struct device_node *codec_np, *cpu_np; - struct clk *pllb; struct snd_soc_card *card = &snd_soc_at91sam9g20ek; int ret; @@ -162,31 +131,6 @@ static int at91sam9g20ek_audio_probe(struct platform_device *pdev) return -EINVAL; } - /* - * Codec MCLK is supplied by PCK0 - set it up. - */ - mclk = clk_get(NULL, "pck0"); - if (IS_ERR(mclk)) { - dev_err(&pdev->dev, "Failed to get MCLK\n"); - ret = PTR_ERR(mclk); - goto err; - } - - pllb = clk_get(NULL, "pllb"); - if (IS_ERR(pllb)) { - dev_err(&pdev->dev, "Failed to get PLLB\n"); - ret = PTR_ERR(pllb); - goto err_mclk; - } - ret = clk_set_parent(mclk, pllb); - clk_put(pllb); - if (ret != 0) { - dev_err(&pdev->dev, "Failed to set MCLK parent\n"); - goto err_mclk; - } - - clk_set_rate(mclk, MCLK_RATE); - card->dev = &pdev->dev; /* Parse device node info */ @@ -230,9 +174,6 @@ static int at91sam9g20ek_audio_probe(struct platform_device *pdev) return ret; -err_mclk: - clk_put(mclk); - mclk = NULL; err: atmel_ssc_put_audio(0); return ret; @@ -242,8 +183,6 @@ static int at91sam9g20ek_audio_remove(struct platform_device *pdev) { struct snd_soc_card *card = platform_get_drvdata(pdev); - clk_disable(mclk); - mclk = NULL; snd_soc_unregister_card(card); atmel_ssc_put_audio(0); From patchwork Fri Mar 25 15:42:40 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Brown X-Patchwork-Id: 554394 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 10FD6C433EF for ; Fri, 25 Mar 2022 15:45:35 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 43C94171E; Fri, 25 Mar 2022 16:44:43 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 43C94171E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1648223133; bh=zW8PnmEKt5KbaGyqmP5Ywlvky3P9alY0nil2EBlvk0g=; h=From:To:Subject:Date:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=E4Of+8ZUOfberNPXENWJ7vXKuzpVaIIW2EZZQJ1fBtLmQoHj2BePgydP3Rz8WX+um Q84eI1tR/EVo5H07mhJ0Me2rIibEbkt9BMyTdMhGnuVBHZJEowVm4gIRkQoBYqe7yD dZ0fS2FhZ+vw7GKL/yd5MN/X6xQgycb1yQIBhXwM= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id AF2CCF80519; Fri, 25 Mar 2022 16:43:56 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 0C03FF8051A; Fri, 25 Mar 2022 16:43:55 +0100 (CET) Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id BB46FF80517 for ; Fri, 25 Mar 2022 16:43:35 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz BB46FF80517 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="TdouIa+g" Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id D77AAB827B7; Fri, 25 Mar 2022 15:43:34 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9FC59C340E9; Fri, 25 Mar 2022 15:43:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1648223013; bh=zW8PnmEKt5KbaGyqmP5Ywlvky3P9alY0nil2EBlvk0g=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=TdouIa+g3hebWCbUeaeMhhpV3S+ZXbCTpX8A7X9CRhrUPsNwTYFQMLKwxnT7Ay5iG dFS4F/u13544RznyPEL6WObLRwJ3EtYrID0j5OTJpHG5DJFaVA+801oQ6DGiV85CXq uX2yQySJL5h/cnBgAxn4NAu41YBR/J1Ybz/lwE8zV2BFz2VkHHPxB/bKrbq5NEq/6S t2DUj8f6WxHXaet4nvbe6mO20ed0OrEbg3Mq96HCqqo1ufwPh3klvePL3XpAJIruha Jvb03JT17CSQPTk8ASpYZqpkFZOkZIVeFIkWBkwsqv8GjT7bDQQKeVEraNSVs+vV6S f/a555oM3gw+w== From: Mark Brown To: Liam Girdwood , Codrin Ciubotariu Subject: [PATCH v1 2/3] ASoC: atmel: Fix error handling in at91samg20ek probe() Date: Fri, 25 Mar 2022 15:42:40 +0000 Message-Id: <20220325154241.1600757-3-broonie@kernel.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220325154241.1600757-1-broonie@kernel.org> References: <20220325154241.1600757-1-broonie@kernel.org> MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1522; h=from:subject; bh=zW8PnmEKt5KbaGyqmP5Ywlvky3P9alY0nil2EBlvk0g=; b=owEBbQGS/pANAwAKASTWi3JdVIfQAcsmYgBiPeLvLm54d5ZOtO4ZWPZ1JAbCbUeO6Eg4aIH6kUmb Du3dVQuJATMEAAEKAB0WIQSt5miqZ1cYtZ/in+ok1otyXVSH0AUCYj3i7wAKCRAk1otyXVSH0I6uB/ 9yO5SP2kSH0g+jaZH8UUdPEIoOjZfzVTk9Lq7m5Z6kNeJBCB8Yk862oQzwderh9AanncZ544C2tnWI kHfUop8HNKQf0Nc2HdUg6Z95PQ7o6LnWr8RjNxBx7GjfiXPOVHaNeCAC1Mgbg5nyJTURCW5/HjnO/q uRnz7Jylxka8tWPh68z++NqqaBTdozlmqR5P/2MRHPObkKZLae6dp5/0psYSYe8G5owd+rS0Kgc3Wl cBS057i1QMBEvHcjeuVvhqepJm6nUEAVmAZSo+oSbw0NblfTEeDJpLosW7BQPqJKpGSKTQikVsitIt U6irnBbuFEuYwxC+Zzw63EMQRYkG+3 X-Developer-Key: i=broonie@kernel.org; a=openpgp; fpr=3F2568AAC26998F9E813A1C5C3F436CA30F5D8EB Cc: alsa-devel@alsa-project.org, Mark Brown X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 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: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" The error handling in the AT91SAM9G20-EK machine driver probe did not consistently free the SSC in error paths, sometimes immediately returning an error rather than doing cleanup. Fix this. Signed-off-by: Mark Brown Reviewed-by: Codrin Ciubotariu --- sound/soc/atmel/sam9g20_wm8731.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/sound/soc/atmel/sam9g20_wm8731.c b/sound/soc/atmel/sam9g20_wm8731.c index 0d639a33ad96..d771843011ea 100644 --- a/sound/soc/atmel/sam9g20_wm8731.c +++ b/sound/soc/atmel/sam9g20_wm8731.c @@ -148,7 +148,8 @@ static int at91sam9g20ek_audio_probe(struct platform_device *pdev) codec_np = of_parse_phandle(np, "atmel,audio-codec", 0); if (!codec_np) { dev_err(&pdev->dev, "codec info missing\n"); - return -EINVAL; + ret = -EINVAL; + goto err; } at91sam9g20ek_dai.codecs->of_node = codec_np; @@ -159,7 +160,8 @@ static int at91sam9g20ek_audio_probe(struct platform_device *pdev) if (!cpu_np) { dev_err(&pdev->dev, "dai and pcm info missing\n"); of_node_put(codec_np); - return -EINVAL; + ret = -EINVAL; + goto err; } at91sam9g20ek_dai.cpus->of_node = cpu_np; at91sam9g20ek_dai.platforms->of_node = cpu_np; @@ -170,9 +172,10 @@ static int at91sam9g20ek_audio_probe(struct platform_device *pdev) ret = snd_soc_register_card(card); if (ret) { dev_err(&pdev->dev, "snd_soc_register_card() failed\n"); + goto err; } - return ret; + return 0; err: atmel_ssc_put_audio(0); From patchwork Fri Mar 25 15:42:41 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Brown X-Patchwork-Id: 554047 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id C39E3C433F5 for ; Fri, 25 Mar 2022 15:45:19 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 01A061743; Fri, 25 Mar 2022 16:44:28 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 01A061743 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1648223118; bh=MxjfPO5Hu8lxnbNlv3PHfZL7yAYCiHiBwpLVE8ki6Xw=; h=From:To:Subject:Date:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=jaWD6ei5+lcWok7sA9huAcfPfEYlbRGwJG9QaZMV6nn7/MGM1ULHYUF+ZSqhRSis1 aZnKr8Go1FeQdDtzG4c5cCe4a0NJgP9wlmpKrC5XKfMQ6IKc79F2ccZpRMBvjn52fh bvsEp30rekfoYp5vCO75TqnIwnOTb7S9RrpHjHtE= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 27206F80515; Fri, 25 Mar 2022 16:43:42 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 508D5F80162; Fri, 25 Mar 2022 16:43:39 +0100 (CET) Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id C4B8EF8025B for ; Fri, 25 Mar 2022 16:43:36 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz C4B8EF8025B Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="o4V+Vymj" Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 5D5EDB8292D; Fri, 25 Mar 2022 15:43:36 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1F68CC340F4; Fri, 25 Mar 2022 15:43:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1648223015; bh=MxjfPO5Hu8lxnbNlv3PHfZL7yAYCiHiBwpLVE8ki6Xw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=o4V+VymjMQkFJEt4gkwkNzCDxS/MU8a3UHkRgUyByV1OwlzXkP5H1djUbmzGVu6Z/ Rn7dJx0HpDZFXBhHET/Xih5WprL1GUjiy8q/njFQ1nnNsun8/7OuFSWsyDj63tWPI+ lWk/PPo7fpHUHZh91WkayRQZBLi6Hjf3JguME1NulyCwYzJ42F1Ud81NfRbob0QsVx b6TEBgMWaXZEdPhwP24i1bvRek5HqTuH7e8bOEvffaUAVl5MMdM6jb9eUL7grO39d3 fIZLAo6N4IBh7VIz6CczuvoMwTGLofJiiV/b6AmATr/Ke4BrW4eDelvzuYwfs40u9d mUjI41osa7elg== From: Mark Brown To: Liam Girdwood , Codrin Ciubotariu Subject: [PATCH v1 3/3] ASoC: atmel: Don't squash error codes from atmel_ssc_set_audio() Date: Fri, 25 Mar 2022 15:42:41 +0000 Message-Id: <20220325154241.1600757-4-broonie@kernel.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220325154241.1600757-1-broonie@kernel.org> References: <20220325154241.1600757-1-broonie@kernel.org> MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=936; h=from:subject; bh=MxjfPO5Hu8lxnbNlv3PHfZL7yAYCiHiBwpLVE8ki6Xw=; b=owEBbQGS/pANAwAKASTWi3JdVIfQAcsmYgBiPeLwScNimwcJqOuirx43swpWUrA9sQ89hZEbtiq8 0QtbEzeJATMEAAEKAB0WIQSt5miqZ1cYtZ/in+ok1otyXVSH0AUCYj3i8AAKCRAk1otyXVSH0CZfB/ 9qU4Nopmfu7fuEPjZZxPeB+fpyWghIB+yGf9xewKWs/TfZnsjmgMsbJZmAnjvPeMZnZUvPC+XlyS2s SyyhcQGA8XmEc+iAP98Qn908s1e1oGC9UEth+o35arETOqpLwy4rtliiH5vmAmvMXHEVHhvZSohC8B tQfVUnBnG2Az8OlVqSwLkjmXfPzdf2BiEdFCILoOXDMdp+Y67CjcPAvnmTmLw9+8KFaq/vKpWjFRN7 ZyQePXnGsOYeEX/sQn1RlxE+XWxfNh3Jf6FdboIhb8ks9/8I8TRXABp6JTsDVXazxjiTmxPU9vWMZr mzocfc4BUeA4+xkAaohfrPgS5B55lh X-Developer-Key: i=broonie@kernel.org; a=openpgp; fpr=3F2568AAC26998F9E813A1C5C3F436CA30F5D8EB Cc: alsa-devel@alsa-project.org, Mark Brown X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 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: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" The AT91SAM9G20-EK audio driver is replacing any error code returned by atmel_ssc_set_audio() with -EINVAL which could be unhelpful for debugging. Pass through the error code, and include it in the log message we print for good measure. Signed-off-by: Mark Brown Reviewed-by: Codrin Ciubotariu --- sound/soc/atmel/sam9g20_wm8731.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sound/soc/atmel/sam9g20_wm8731.c b/sound/soc/atmel/sam9g20_wm8731.c index d771843011ea..0365b583ba70 100644 --- a/sound/soc/atmel/sam9g20_wm8731.c +++ b/sound/soc/atmel/sam9g20_wm8731.c @@ -127,8 +127,8 @@ static int at91sam9g20ek_audio_probe(struct platform_device *pdev) ret = atmel_ssc_set_audio(0); if (ret) { - dev_err(&pdev->dev, "ssc channel is not valid\n"); - return -EINVAL; + dev_err(&pdev->dev, "ssc channel is not valid: %d\n", ret); + return ret; } card->dev = &pdev->dev;