linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RESEND, PATCH] mmc: sdhci-pci-gli: Fix GL9763E runtime PM when the system resumes from suspend
@ 2022-05-20 11:42 Ben Chuang
  2022-05-31 13:38 ` Ulf Hansson
  0 siblings, 1 reply; 3+ messages in thread
From: Ben Chuang @ 2022-05-20 11:42 UTC (permalink / raw)
  To: adrian.hunter, ulf.hansson
  Cc: linux-mmc, linux-kernel, greg.tu, ben.chuang, SeanHY.Chen,
	jason.lai, victor.shih, kane.chen, Ben Chuang

When the system resumes from suspend (S3 or S4), the power mode is
MMC_POWER_OFF. In this status, gl9763e_runtime_resume() should not enable
PLL. Add a condition to this function to enable PLL only when the power
mode is MMC_POWER_ON.

Fixes: d607667bb8fa (mmc: sdhci-pci-gli: Add runtime PM for GL9763E)
Signed-off-by: Ben Chuang <benchuanggli@gmail.com>
---
Hi,

Sorry, resend this patch because typo two email addresses.
Sorry for Adrian and Kane.

Best regards,
Ben
---
 drivers/mmc/host/sdhci-pci-gli.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/mmc/host/sdhci-pci-gli.c b/drivers/mmc/host/sdhci-pci-gli.c
index d09728c37d03..d81e5dc90e15 100644
--- a/drivers/mmc/host/sdhci-pci-gli.c
+++ b/drivers/mmc/host/sdhci-pci-gli.c
@@ -972,6 +972,9 @@ static int gl9763e_runtime_resume(struct sdhci_pci_chip *chip)
 	struct sdhci_host *host = slot->host;
 	u16 clock;
 
+	if (host->mmc->ios.power_mode != MMC_POWER_ON)
+		return 0;
+
 	clock = sdhci_readw(host, SDHCI_CLOCK_CONTROL);
 
 	clock |= SDHCI_CLOCK_PLL_EN;
-- 
2.36.0


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [RESEND, PATCH] mmc: sdhci-pci-gli: Fix GL9763E runtime PM when the system resumes from suspend
  2022-05-20 11:42 [RESEND, PATCH] mmc: sdhci-pci-gli: Fix GL9763E runtime PM when the system resumes from suspend Ben Chuang
@ 2022-05-31 13:38 ` Ulf Hansson
  2022-06-02  6:46   ` Ben Chuang
  0 siblings, 1 reply; 3+ messages in thread
From: Ulf Hansson @ 2022-05-31 13:38 UTC (permalink / raw)
  To: Ben Chuang
  Cc: adrian.hunter, linux-mmc, linux-kernel, greg.tu, ben.chuang,
	SeanHY.Chen, jason.lai, victor.shih, kane.chen

On Fri, 20 May 2022 at 13:43, Ben Chuang <benchuanggli@gmail.com> wrote:
>
> When the system resumes from suspend (S3 or S4), the power mode is
> MMC_POWER_OFF. In this status, gl9763e_runtime_resume() should not enable
> PLL. Add a condition to this function to enable PLL only when the power
> mode is MMC_POWER_ON.
>
> Fixes: d607667bb8fa (mmc: sdhci-pci-gli: Add runtime PM for GL9763E)
> Signed-off-by: Ben Chuang <benchuanggli@gmail.com>

Sorry for the delay, I have been out traveling. Unfortunately this
didn't make it for v5.18, although I have queued it up for v5.19 and
added a stable tag.

Thanks and kind regards
Uffe


> ---
> Hi,
>
> Sorry, resend this patch because typo two email addresses.
> Sorry for Adrian and Kane.
>
> Best regards,
> Ben
> ---
>  drivers/mmc/host/sdhci-pci-gli.c | 3 +++
>  1 file changed, 3 insertions(+)
>
> diff --git a/drivers/mmc/host/sdhci-pci-gli.c b/drivers/mmc/host/sdhci-pci-gli.c
> index d09728c37d03..d81e5dc90e15 100644
> --- a/drivers/mmc/host/sdhci-pci-gli.c
> +++ b/drivers/mmc/host/sdhci-pci-gli.c
> @@ -972,6 +972,9 @@ static int gl9763e_runtime_resume(struct sdhci_pci_chip *chip)
>         struct sdhci_host *host = slot->host;
>         u16 clock;
>
> +       if (host->mmc->ios.power_mode != MMC_POWER_ON)
> +               return 0;
> +
>         clock = sdhci_readw(host, SDHCI_CLOCK_CONTROL);
>
>         clock |= SDHCI_CLOCK_PLL_EN;
> --
> 2.36.0
>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [RESEND, PATCH] mmc: sdhci-pci-gli: Fix GL9763E runtime PM when the system resumes from suspend
  2022-05-31 13:38 ` Ulf Hansson
@ 2022-06-02  6:46   ` Ben Chuang
  0 siblings, 0 replies; 3+ messages in thread
From: Ben Chuang @ 2022-06-02  6:46 UTC (permalink / raw)
  To: Ulf Hansson
  Cc: Adrian Hunter, linux-mmc, Linux Kernel Mailing List, greg.tu,
	Ben Chuang, SeanHY.Chen, jason.lai, victor.shih, kane.chen

On Tue, May 31, 2022 at 9:39 PM Ulf Hansson <ulf.hansson@linaro.org> wrote:
>
> On Fri, 20 May 2022 at 13:43, Ben Chuang <benchuanggli@gmail.com> wrote:
> >
> > When the system resumes from suspend (S3 or S4), the power mode is
> > MMC_POWER_OFF. In this status, gl9763e_runtime_resume() should not enable
> > PLL. Add a condition to this function to enable PLL only when the power
> > mode is MMC_POWER_ON.
> >
> > Fixes: d607667bb8fa (mmc: sdhci-pci-gli: Add runtime PM for GL9763E)
> > Signed-off-by: Ben Chuang <benchuanggli@gmail.com>
>
> Sorry for the delay, I have been out traveling. Unfortunately this
> didn't make it for v5.18, although I have queued it up for v5.19 and
> added a stable tag.
>
> Thanks and kind regards
> Uffe
>

It's ok. Thank you for the explanation.

Best regards,
Ben

>
> > ---
> > Hi,
> >
> > Sorry, resend this patch because typo two email addresses.
> > Sorry for Adrian and Kane.
> >
> > Best regards,
> > Ben
> > ---
> >  drivers/mmc/host/sdhci-pci-gli.c | 3 +++
> >  1 file changed, 3 insertions(+)
> >
> > diff --git a/drivers/mmc/host/sdhci-pci-gli.c b/drivers/mmc/host/sdhci-pci-gli.c
> > index d09728c37d03..d81e5dc90e15 100644
> > --- a/drivers/mmc/host/sdhci-pci-gli.c
> > +++ b/drivers/mmc/host/sdhci-pci-gli.c
> > @@ -972,6 +972,9 @@ static int gl9763e_runtime_resume(struct sdhci_pci_chip *chip)
> >         struct sdhci_host *host = slot->host;
> >         u16 clock;
> >
> > +       if (host->mmc->ios.power_mode != MMC_POWER_ON)
> > +               return 0;
> > +
> >         clock = sdhci_readw(host, SDHCI_CLOCK_CONTROL);
> >
> >         clock |= SDHCI_CLOCK_PLL_EN;
> > --
> > 2.36.0
> >

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-06-02  6:46 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-20 11:42 [RESEND, PATCH] mmc: sdhci-pci-gli: Fix GL9763E runtime PM when the system resumes from suspend Ben Chuang
2022-05-31 13:38 ` Ulf Hansson
2022-06-02  6:46   ` Ben Chuang

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).