linux-mmc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jesper Nilsson <jesper.nilsson@axis.com>
To: Ulf Hansson <ulf.hansson@linaro.org>
Cc: "linux-gpio@vger.kernel.org" <linux-gpio@vger.kernel.org>,
	Linus Walleij <linus.walleij@linaro.org>,
	"linux-mmc@vger.kernel.org" <linux-mmc@vger.kernel.org>,
	Jesper Nilsson <jespern@axis.com>, Lars Persson <larper@axis.com>
Subject: Re: [PATCH 4/9] mmc: usdhi6rol0: Convert to pinctrl_select_default_state()
Date: Mon, 9 Dec 2019 10:00:11 +0100	[thread overview]
Message-ID: <20191209090011.bt6j6rsrjisbhnkg@axis.com> (raw)
In-Reply-To: <20191206170821.29711-5-ulf.hansson@linaro.org>

On Fri, Dec 06, 2019 at 06:08:16PM +0100, Ulf Hansson wrote:
> Let's drop the boilerplate code for managing the default pinctrl state and
> convert into using the new pinctrl_select_default_state().

Looks good, thanks!

Acked-by: Jesper Nilsson <jesper.nilsson@axis.com>

> Cc: Lars Persson <lars.persson@axis.com>
> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
> ---
>  drivers/mmc/host/usdhi6rol0.c | 15 +--------------
>  1 file changed, 1 insertion(+), 14 deletions(-)
> 
> diff --git a/drivers/mmc/host/usdhi6rol0.c b/drivers/mmc/host/usdhi6rol0.c
> index b11ac2314328..969a34e698f2 100644
> --- a/drivers/mmc/host/usdhi6rol0.c
> +++ b/drivers/mmc/host/usdhi6rol0.c
> @@ -199,7 +199,6 @@ struct usdhi6_host {
>  
>  	/* Pin control */
>  	struct pinctrl *pinctrl;
> -	struct pinctrl_state *pins_default;
>  	struct pinctrl_state *pins_uhs;
>  };
>  
> @@ -1162,8 +1161,7 @@ static int usdhi6_set_pinstates(struct usdhi6_host *host, int voltage)
>  					    host->pins_uhs);
>  
>  	default:
> -		return pinctrl_select_state(host->pinctrl,
> -					    host->pins_default);
> +		return pinctrl_select_default_state(mmc_dev(host->mmc));
>  	}
>  }
>  
> @@ -1770,17 +1768,6 @@ static int usdhi6_probe(struct platform_device *pdev)
>  	}
>  
>  	host->pins_uhs = pinctrl_lookup_state(host->pinctrl, "state_uhs");
> -	if (!IS_ERR(host->pins_uhs)) {
> -		host->pins_default = pinctrl_lookup_state(host->pinctrl,
> -							  PINCTRL_STATE_DEFAULT);
> -
> -		if (IS_ERR(host->pins_default)) {
> -			dev_err(dev,
> -				"UHS pinctrl requires a default pin state.\n");
> -			ret = PTR_ERR(host->pins_default);
> -			goto e_free_mmc;
> -		}
> -	}
>  
>  	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
>  	host->base = devm_ioremap_resource(dev, res);
> -- 
> 2.17.1
> 

/^JN - Jesper Nilsson
-- 
               Jesper Nilsson -- jesper.nilsson@axis.com

  reply	other threads:[~2019-12-09  9:07 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-06 17:08 [PATCH 0/9] pinctrl: Consolidate some pinctrl code for mmc Ulf Hansson
2019-12-06 17:08 ` [PATCH 1/9] pinctrl: core: Add pinctrl_select_default_state() and export it Ulf Hansson
2019-12-16  8:02   ` Linus Walleij
2019-12-16 12:09     ` Ulf Hansson
2019-12-06 17:08 ` [PATCH 2/9] mmc: meson-gx: Convert to pinctrl_select_default_state() Ulf Hansson
2019-12-10 10:06   ` Jerome Brunet
2019-12-06 17:08 ` [PATCH 3/9] mmc: mmci: " Ulf Hansson
2019-12-06 17:08 ` [PATCH 4/9] mmc: usdhi6rol0: " Ulf Hansson
2019-12-09  9:00   ` Jesper Nilsson [this message]
2019-12-06 17:08 ` [PATCH 5/9] mmc: omap_hsmmc: " Ulf Hansson
2019-12-06 17:08 ` [PATCH 6/9] mmc: sdhci-esdhc-imx: " Ulf Hansson
2019-12-06 17:08 ` [PATCH 7/9] mmc: atmel-mci: " Ulf Hansson
2019-12-06 17:08 ` [PATCH 8/9] mmc: jz4740: " Ulf Hansson
2019-12-07 16:28   ` Paul Cercueil
2019-12-08 23:56   ` Linus Walleij
2019-12-06 17:08 ` [PATCH 9/9] mmc: uniphier-sd: " Ulf Hansson
2019-12-09  5:12   ` Masahiro Yamada
2019-12-16  8:02 ` [PATCH 0/9] pinctrl: Consolidate some pinctrl code for mmc Linus Walleij

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=20191209090011.bt6j6rsrjisbhnkg@axis.com \
    --to=jesper.nilsson@axis.com \
    --cc=jespern@axis.com \
    --cc=larper@axis.com \
    --cc=linus.walleij@linaro.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-mmc@vger.kernel.org \
    --cc=ulf.hansson@linaro.org \
    /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).