]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
mmc: host: sdhci-esdhc-imx: refactor the system PM logic
authorLuke Wang <ziniu.wang_1@nxp.com>
Wed, 14 May 2025 09:49:03 +0000 (17:49 +0800)
committerUlf Hansson <ulf.hansson@linaro.org>
Mon, 19 May 2025 11:56:49 +0000 (13:56 +0200)
commit676a83855614635af3bf31ad3f8fec4031f81354
treeeb6e0a63b5ca795a2b7b38613308a14164f1392d
parentb8b0f46d1550d624dd595201b1f5bc638dd4fbfe
mmc: host: sdhci-esdhc-imx: refactor the system PM logic

Current suspend/resume logic has one issue. In suspend, will config
register when call sdhci_suspend_host(), but at this time, can't
guarantee host in runtime resume state. If not, the per clock is gate
off, access register will hang.

In sdhci_esdhc_suspend/sdhci_esdhc_resume, remove sdhci_suspend_host()
and sdhci_resume_host(), all are handled in runtime PM callbacks except
the wakeup irq setting. For wakeup irq setting, use pm_runtime_get_sync()
in sdhci_esdhc_suspend() to make sure clock gate on.

Remove pinctrl_pm_select_default_state() in sdhci_esdhc_resume, because
pm_runtime_force_resume() already config the pinctrl state according to
ios timing, and here config the default pinctrl state again is wrong for
SDIO3.0 device if it keep power in suspend.

Signed-off-by: Haibo Chen <haibo.chen@nxp.com>
Signed-off-by: Luke Wang <ziniu.wang_1@nxp.com>
Acked-by: Adrian Hunter <adrian.hunter@intel.com>
Link: https://lore.kernel.org/r/20250514094903.1771642-2-ziniu.wang_1@nxp.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
drivers/mmc/host/sdhci-esdhc-imx.c