linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Marcel Ziswiler <marcel@ziswiler.com>
To: alsa-devel@alsa-project.org, linux-tegra@vger.kernel.org
Cc: Marcel Ziswiler <marcel.ziswiler@toradex.com>,
	Jaroslav Kysela <perex@perex.cz>,
	Thierry Reding <thierry.reding@gmail.com>,
	Jonathan Hunter <jonathanh@nvidia.com>,
	Mark Brown <broonie@kernel.org>,
	linux-kernel@vger.kernel.org, Takashi Iwai <tiwai@suse.com>,
	Liam Girdwood <lgirdwood@gmail.com>
Subject: [PATCH 2/2] ASoC: tegra: probe deferral error reporting
Date: Fri, 20 Jul 2018 10:04:24 +0200	[thread overview]
Message-ID: <20180720080424.31505-2-marcel@ziswiler.com> (raw)
In-Reply-To: <20180720080424.31505-1-marcel@ziswiler.com>

From: Marcel Ziswiler <marcel.ziswiler@toradex.com>

Actually report the error codes from of_get_named_gpio() resp.
devm_gpio_request_one() upon trying to get the codec reset resp. sync
GPIOs which may as well just be a probe deferrals.

Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>

---

 sound/soc/tegra/tegra20_ac97.c | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/sound/soc/tegra/tegra20_ac97.c b/sound/soc/tegra/tegra20_ac97.c
index 682ef33afb5f..4875512f0732 100644
--- a/sound/soc/tegra/tegra20_ac97.c
+++ b/sound/soc/tegra/tegra20_ac97.c
@@ -351,18 +351,21 @@ static int tegra20_ac97_platform_probe(struct platform_device *pdev)
 		ret = devm_gpio_request_one(&pdev->dev, ac97->reset_gpio,
 					    GPIOF_OUT_INIT_HIGH, "codec-reset");
 		if (ret) {
-			dev_err(&pdev->dev, "could not get codec-reset GPIO\n");
+			dev_err(&pdev->dev, "could not get codec-reset GPIO: "
+					    "%d\n", ret);
 			goto err_clk_put;
 		}
 	} else {
-		dev_err(&pdev->dev, "no codec-reset GPIO supplied\n");
+		ret = ac97->reset_gpio;
+		dev_err(&pdev->dev, "no codec-reset GPIO supplied: %d\n", ret);
 		goto err_clk_put;
 	}
 
 	ac97->sync_gpio = of_get_named_gpio(pdev->dev.of_node,
 					    "nvidia,codec-sync-gpio", 0);
 	if (!gpio_is_valid(ac97->sync_gpio)) {
-		dev_err(&pdev->dev, "no codec-sync GPIO supplied\n");
+		ret = ac97->sync_gpio;
+		dev_err(&pdev->dev, "no codec-sync GPIO supplied: %d\n", ret);
 		goto err_clk_put;
 	}
 
-- 
2.14.4


  reply	other threads:[~2018-07-20  8:04 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-20  8:04 [PATCH 1/2] ASoC: tegra: improve goto error label Marcel Ziswiler
2018-07-20  8:04 ` Marcel Ziswiler [this message]
2018-07-20 12:16   ` [PATCH 2/2] ASoC: tegra: probe deferral error reporting Mark Brown
2018-07-20 12:31     ` Marcel Ziswiler
2018-07-21  9:56       ` Mark Brown
2018-07-21 10:06         ` Marcel Ziswiler
2018-07-23 10:25           ` Mark Brown
2018-07-21 11:17         ` Dmitry Osipenko
2018-07-21 11:55           ` Marcel Ziswiler
2018-07-21 12:03             ` Dmitry Osipenko
2018-07-21 12:15               ` Dmitry Osipenko
2018-07-26  8:34   ` Stefan Agner
2018-07-20 12:19 ` Applied "ASoC: tegra: improve goto error label" to the asoc tree Mark Brown

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180720080424.31505-2-marcel@ziswiler.com \
    --to=marcel@ziswiler.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=jonathanh@nvidia.com \
    --cc=lgirdwood@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tegra@vger.kernel.org \
    --cc=marcel.ziswiler@toradex.com \
    --cc=perex@perex.cz \
    --cc=thierry.reding@gmail.com \
    --cc=tiwai@suse.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).