RE: [PATCH 04/14] mmc: sdhci-esdhc-imx: restore pin state when resume back

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

 



> -----Original Message-----
> From: Adrian Hunter <adrian.hunter@xxxxxxxxx>
> Sent: 2019年11月26日 20:51
> To: BOUGH CHEN <haibo.chen@xxxxxxx>; ulf.hansson@xxxxxxxxxx;
> shawnguo@xxxxxxxxxx; s.hauer@xxxxxxxxxxxxxx; kernel@xxxxxxxxxxxxxx
> Cc: festevam@xxxxxxxxx; linux-mmc@xxxxxxxxxxxxxxx; dl-linux-imx
> <linux-imx@xxxxxxx>
> Subject: Re: [PATCH 04/14] mmc: sdhci-esdhc-imx: restore pin state when
> resume back
> 
> On 15/11/19 1:12 PM, haibo.chen@xxxxxxx wrote:
> > From: Haibo Chen <haibo.chen@xxxxxxx>
> >
> > In some low power mode, SoC will lose the pin state, so need to
> > restore the pin state when resume back.
> >
> > Signed-off-by: Haibo Chen <haibo.chen@xxxxxxx>
> > ---
> >  drivers/mmc/host/sdhci-esdhc-imx.c | 8 +++++++-
> >  1 file changed, 7 insertions(+), 1 deletion(-)
> >
> > diff --git a/drivers/mmc/host/sdhci-esdhc-imx.c
> > b/drivers/mmc/host/sdhci-esdhc-imx.c
> > index 1c988d6a2433..25b01f059aca 100644
> > --- a/drivers/mmc/host/sdhci-esdhc-imx.c
> > +++ b/drivers/mmc/host/sdhci-esdhc-imx.c
> > @@ -1623,7 +1623,11 @@ static int sdhci_esdhc_suspend(struct device
> *dev)
> >  	if (host->tuning_mode != SDHCI_TUNING_MODE_3)
> >  		mmc_retune_needed(host->mmc);
> >
> > -	return sdhci_suspend_host(host);
> > +	ret = sdhci_suspend_host(host);
> > +	if (!ret)
> > +		pinctrl_pm_select_sleep_state(dev);
> 
> Error return?

Thanks for point out that, I will check the return of pinctrl_pm_select_sleep_state(dev).

> 
> > +
> > +	return ret;
> >  }
> >
> >  static int sdhci_esdhc_resume(struct device *dev) @@ -1631,6 +1635,8
> > @@ static int sdhci_esdhc_resume(struct device *dev)
> >  	struct sdhci_host *host = dev_get_drvdata(dev);
> >  	int ret;
> >
> > +	pinctrl_pm_select_default_state(dev);
> 
> Error return?
> 
> > +
> >  	/* re-initialize hw state in case it's lost in low power mode */
> >  	sdhci_esdhc_imx_hwinit(host);
> >
> >





[Index of Archives]     [Linux Memonry Technology]     [Linux USB Devel]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux