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

From: haibo . chen
Date: Mon Oct 14 2024 - 02:00:39 EST


From: Haibo Chen <haibo.chen@xxxxxxx>

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

--
2.34.1