mbox series

[0/4] refactor the system PM logic for sdhci-esdhc-imx

Message ID 20241014060130.1162629-1-haibo.chen@nxp.com (mailing list archive)
Headers show
Series refactor the system PM logic for sdhci-esdhc-imx | expand

Message

Bough Chen Oct. 14, 2024, 6:01 a.m. UTC
From: Haibo Chen <haibo.chen@nxp.com>

Currently, if SD slot do not insert any SD card, system suspend/resume
will hung, because in system suspend, there is register access, but the
usdhc per clock is gate off since it is in runtime suspend state.

This patch set refactor the system PM logic, try to merge PM callback
sdhci_esdhc_suspend/sdhci_esdhc_resume into runtiem PM callback
sdhci_esdhc_runtime_suspend/sdhci_esdhc_runtime_resume, and use
pm_runtime_force_suspend/resume instead. To support SDIO wakeup,
add this pm_runtime_force_suspend/resume in no irq stage.

Haibo Chen (4):
  mmc: sdhci: export APIs for sdhci irq wakeup
  mmc: host: sdhci-esdhc-imx: refactor the system PM logic
  mmc: host: sdhci-esdhc-imx: save tuning value for the SDIO card as
    wakeup source
  mmc: sdhci-esdhc-imx: do not change to sleep pinctrl state in suspend
    if enable wakeup

 drivers/mmc/host/sdhci-esdhc-imx.c | 145 ++++++++++++++++++++++++-----
 drivers/mmc/host/sdhci.c           |   6 +-
 drivers/mmc/host/sdhci.h           |   2 +
 3 files changed, 127 insertions(+), 26 deletions(-)