Re: [PATCH 2/9] mmc: meson-gx: Convert to pinctrl_select_default_state()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri 06 Dec 2019 at 18:08, Ulf Hansson <ulf.hansson@xxxxxxxxxx> wrote:

> Let's drop the boilerplate code for managing the default pinctrl state and
> convert into using the new pinctrl_select_default_state().
>

Reviewed-by: Jerome Brunet <jbrunet@xxxxxxxxxxxx>

> Cc: Kevin Hilman <khilman@xxxxxxxxxxxx>
> Signed-off-by: Ulf Hansson <ulf.hansson@xxxxxxxxxx>
> ---
>  drivers/mmc/host/meson-gx-mmc.c | 10 +---------
>  1 file changed, 1 insertion(+), 9 deletions(-)
>
> diff --git a/drivers/mmc/host/meson-gx-mmc.c b/drivers/mmc/host/meson-gx-mmc.c
> index e712315c7e8d..35400cf2a2e4 100644
> --- a/drivers/mmc/host/meson-gx-mmc.c
> +++ b/drivers/mmc/host/meson-gx-mmc.c
> @@ -161,7 +161,6 @@ struct meson_host {
>  	bool dram_access_quirk;
>  
>  	struct pinctrl *pinctrl;
> -	struct pinctrl_state *pins_default;
>  	struct pinctrl_state *pins_clk_gate;
>  
>  	unsigned int bounce_buf_size;
> @@ -327,7 +326,7 @@ static void meson_mmc_clk_ungate(struct meson_host *host)
>  	u32 cfg;
>  
>  	if (host->pins_clk_gate)
> -		pinctrl_select_state(host->pinctrl, host->pins_default);
> +		pinctrl_select_default_state(host->dev);
>  
>  	/* Make sure the clock is not stopped in the controller */
>  	cfg = readl(host->regs + SD_EMMC_CFG);
> @@ -1101,13 +1100,6 @@ static int meson_mmc_probe(struct platform_device *pdev)
>  		goto free_host;
>  	}
>  
> -	host->pins_default = pinctrl_lookup_state(host->pinctrl,
> -						  PINCTRL_STATE_DEFAULT);
> -	if (IS_ERR(host->pins_default)) {
> -		ret = PTR_ERR(host->pins_default);
> -		goto free_host;
> -	}
> -
>  	host->pins_clk_gate = pinctrl_lookup_state(host->pinctrl,
>  						   "clk-gate");
>  	if (IS_ERR(host->pins_clk_gate)) {




[Index of Archives]     [Linux SPI]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux