[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <930b05df-c502-192e-3cb9-9e1874701cce@nvidia.com>
Date: Wed, 15 Aug 2018 17:02:39 +0100
From: Jon Hunter <jonathanh@...dia.com>
To: Marcel Ziswiler <marcel@...wiler.com>,
<alsa-devel@...a-project.org>, <linux-tegra@...r.kernel.org>
CC: Stefan Agner <stefan@...er.ch>,
Marcel Ziswiler <marcel.ziswiler@...adex.com>,
Jaroslav Kysela <perex@...ex.cz>,
Thierry Reding <thierry.reding@...il.com>,
Mark Brown <broonie@...nel.org>,
<linux-kernel@...r.kernel.org>, Takashi Iwai <tiwai@...e.com>,
Liam Girdwood <lgirdwood@...il.com>
Subject: Re: [PATCH v2] ASoC: tegra: probe deferral error reporting
On 14/08/18 15:01, Marcel Ziswiler wrote:
> From: Marcel Ziswiler <marcel.ziswiler@...adex.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 unless it is just a probe deferral.
>
> Signed-off-by: Marcel Ziswiler <marcel.ziswiler@...adex.com>
>
> ---
>
> Changes in v2:
> - Silence probe deferral as suggested by Stefan.
> - Fix line over 80 characters as reported by checkpatch.
>
> sound/soc/tegra/tegra20_ac97.c | 19 ++++++++++++++++---
> 1 file changed, 16 insertions(+), 3 deletions(-)
>
> diff --git a/sound/soc/tegra/tegra20_ac97.c b/sound/soc/tegra/tegra20_ac97.c
> index 682ef33afb5f..2ac6b2d73980 100644
> --- a/sound/soc/tegra/tegra20_ac97.c
> +++ b/sound/soc/tegra/tegra20_ac97.c
> @@ -351,18 +351,31 @@ 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");
> + if (ret != -EPROBE_DEFER)
> + 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;
> + if (ret != -EPROBE_DEFER)
> + 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;
> + if (ret != -EPROBE_DEFER)
> + dev_err(&pdev->dev, "no codec-sync GPIO supplied: %d\n",
> + ret);
> +
> goto err_clk_put;
> }
Thanks, looks good to me. However, I wonder why we don't request the
'sync_gpio' in the probe like we do for the reset? Otherwise ...
Acked-by: Jon Hunter <jonathanh@...dia.com>
Cheers
Jon
--
nvpublic
Powered by blists - more mailing lists