All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ben Chuang <benchuanggli@gmail.com>
To: adrian.hunter@intel.com, ulf.hansson@linaro.org
Cc: linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org,
	greg.tu@genesyslogic.com.tw, ben.chuang@genesyslogic.com.tw,
	SeanHY.Chen@genesyslogic.com.tw, jason.lai@genesyslogic.com.tw,
	victor.shih@genesyslogic.com.tw,
	kane.chen@intel.corp-partner.google.com,
	Ben Chuang <benchuanggli@gmail.com>
Subject: [RESEND, PATCH] mmc: sdhci-pci-gli: Fix GL9763E runtime PM when the system resumes from suspend
Date: Fri, 20 May 2022 19:42:42 +0800	[thread overview]
Message-ID: <20220520114242.150235-1-benchuanggli@gmail.com> (raw)

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


             reply	other threads:[~2022-05-20 11:43 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-20 11:42 Ben Chuang [this message]
2022-05-31 13:38 ` [RESEND, PATCH] mmc: sdhci-pci-gli: Fix GL9763E runtime PM when the system resumes from suspend Ulf Hansson
2022-06-02  6:46   ` Ben Chuang

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=20220520114242.150235-1-benchuanggli@gmail.com \
    --to=benchuanggli@gmail.com \
    --cc=SeanHY.Chen@genesyslogic.com.tw \
    --cc=adrian.hunter@intel.com \
    --cc=ben.chuang@genesyslogic.com.tw \
    --cc=greg.tu@genesyslogic.com.tw \
    --cc=jason.lai@genesyslogic.com.tw \
    --cc=kane.chen@intel.corp-partner.google.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mmc@vger.kernel.org \
    --cc=ulf.hansson@linaro.org \
    --cc=victor.shih@genesyslogic.com.tw \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.