On 12 June 2015 at 11:31, Mirza Krak <mirza.k...@hostmobility.com> wrote:
> From: Mirza Krak <mirza.k...@hostmobility.com>
>
> Add support for current states of pinctrl, which are "default", "idle"
> and "sleep".
>
> The "default" pinctrl state is set by Drivers core before
> calling the driver's probe, hence we do not need a initial call to
> "default" state.
>
> Signed-off-by: Mirza Krak <mirza.k...@hostmobility.com>

Hi Mirza,

This looks okay to me, but it seems like it needs a re-base towards my
mmc next branch.

Kind regards
Uffe

> ---
>  drivers/mmc/host/sdhci-esdhc-imx.c | 8 ++++++++
>  1 file changed, 8 insertions(+)
>
> diff --git a/drivers/mmc/host/sdhci-esdhc-imx.c 
> b/drivers/mmc/host/sdhci-esdhc-imx.c
> index 84b3365e4773..6d51a4f48361 100644
> --- a/drivers/mmc/host/sdhci-esdhc-imx.c
> +++ b/drivers/mmc/host/sdhci-esdhc-imx.c
> @@ -1129,6 +1129,8 @@ static int sdhci_esdhc_suspend(struct device *dev)
>         pm_runtime_mark_last_busy(dev);
>         pm_runtime_put_autosuspend(dev);
>
> +       pinctrl_pm_select_sleep_state(dev);
> +
>         return ret;
>  }
>
> @@ -1137,6 +1139,8 @@ static int sdhci_esdhc_resume(struct device *dev)
>         int ret;
>         struct sdhci_host *host = dev_get_drvdata(dev);
>
> +       pinctrl_pm_select_default_state(dev);
> +
>         pm_runtime_get_sync(dev);
>         ret = sdhci_resume_host(host);
>         pm_runtime_mark_last_busy(dev);
> @@ -1160,6 +1164,8 @@ static int sdhci_esdhc_runtime_suspend(struct device 
> *dev)
>         }
>         clk_disable_unprepare(imx_data->clk_ahb);
>
> +       pinctrl_pm_select_idle_state(dev);
> +
>         return ret;
>  }
>
> @@ -1169,6 +1175,8 @@ static int sdhci_esdhc_runtime_resume(struct device 
> *dev)
>         struct sdhci_pltfm_host *pltfm_host = sdhci_priv(host);
>         struct pltfm_imx_data *imx_data = pltfm_host->priv;
>
> +       pinctrl_pm_select_default_state(dev);
> +
>         if (!sdhci_sdio_irq_enabled(host)) {
>                 clk_prepare_enable(imx_data->clk_per);
>                 clk_prepare_enable(imx_data->clk_ipg);
> --
> 2.1.0
>
--
To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to