From: Ulf Hansson <ulf.hansson@linaro.org>
To: Chuhong Yuan <hslester96@gmail.com>,
Wolfram Sang <wsa+renesas@sang-engineering.com>
Cc: "linux-mmc@vger.kernel.org" <linux-mmc@vger.kernel.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] mmc: renesas_sdhi: add checks for pinctrl_lookup_state
Date: Mon, 21 Oct 2019 16:32:49 +0200 [thread overview]
Message-ID: <CAPDyKFoBYchP96hv=7XfTo8CrCSD+KC0h_oFRAsOYT-Lc1SFZQ@mail.gmail.com> (raw)
In-Reply-To: <20191018131338.11713-1-hslester96@gmail.com>
On Fri, 18 Oct 2019 at 15:13, Chuhong Yuan <hslester96@gmail.com> wrote:
>
> renesas_sdhi_probe misses checks for pinctrl_lookup_state and may miss
> failures.
> Add checks for them to fix the problem.
>
> Signed-off-by: Chuhong Yuan <hslester96@gmail.com>
> ---
> drivers/mmc/host/renesas_sdhi_core.c | 5 +++++
> 1 file changed, 5 insertions(+)
>
> diff --git a/drivers/mmc/host/renesas_sdhi_core.c b/drivers/mmc/host/renesas_sdhi_core.c
> index d4ada5cca2d1..dc5ad6632df3 100644
> --- a/drivers/mmc/host/renesas_sdhi_core.c
> +++ b/drivers/mmc/host/renesas_sdhi_core.c
> @@ -694,8 +694,13 @@ int renesas_sdhi_probe(struct platform_device *pdev,
> if (!IS_ERR(priv->pinctrl)) {
> priv->pins_default = pinctrl_lookup_state(priv->pinctrl,
> PINCTRL_STATE_DEFAULT);
> + if (IS_ERR(priv->pins_default))
> + return PTR_ERR(priv->pins_default);
> +
> priv->pins_uhs = pinctrl_lookup_state(priv->pinctrl,
> "state_uhs");
> + if (IS_ERR(priv->pins_uhs))
> + return PTR_ERR(priv->pins_uhs);
> }
This looks correct to me, as I guess if there is a pinctrl specified
for device node of the controller, it means that it should be used!?
I understand that this is only used for those variants that supports
UHS-I via the renesas_sdhi_start_signal_voltage_switch(). Wolfram, is
this fine you think?
>
> host = tmio_mmc_host_alloc(pdev, mmc_data);
> --
> 2.20.1
>
Kind regards
Uffe
next prev parent reply other threads:[~2019-10-21 14:32 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-10-18 13:13 [PATCH] mmc: renesas_sdhi: add checks for pinctrl_lookup_state Chuhong Yuan
2019-10-21 14:32 ` Ulf Hansson [this message]
2019-10-21 20:10 ` Wolfram Sang
2019-10-23 15:33 ` Wolfram Sang
2019-10-30 15:09 ` Ulf Hansson
2019-10-31 22:12 ` Wolfram Sang
2019-11-07 8:30 ` Geert Uytterhoeven
2019-11-24 3:20 ` Chuhong Yuan
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='CAPDyKFoBYchP96hv=7XfTo8CrCSD+KC0h_oFRAsOYT-Lc1SFZQ@mail.gmail.com' \
--to=ulf.hansson@linaro.org \
--cc=hslester96@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mmc@vger.kernel.org \
--cc=wsa+renesas@sang-engineering.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).