Commit f62f7bcc authored by Haibo Chen's avatar Haibo Chen Committed by Ulf Hansson
Browse files

mmc: sdhci-esdhc-imx: Enable support for system wakeup for SDIO



Enable support for system wakeup, by setting the wakeup capability for the
slot corresponding to the SDIO card. Users need to enable the wakeup
through the sysfs interface.

Signed-off-by: default avatarHaibo Chen <haibo.chen@nxp.com>
Link: https://lore.kernel.org/r/1623326486-25275-1-git-send-email-haibo.chen@nxp.com


Signed-off-by: default avatarUlf Hansson <ulf.hansson@linaro.org>
parent 21adc2e4
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -1620,6 +1620,14 @@ static int sdhci_esdhc_imx_probe(struct platform_device *pdev)
	if (err)
		goto disable_ahb_clk;

	/*
	 * Setup the wakeup capability here, let user to decide
	 * whether need to enable this wakeup through sysfs interface.
	 */
	if ((host->mmc->pm_caps & MMC_PM_KEEP_POWER) &&
			(host->mmc->pm_caps & MMC_PM_WAKE_SDIO_IRQ))
		device_set_wakeup_capable(&pdev->dev, true);

	pm_runtime_set_active(&pdev->dev);
	pm_runtime_set_autosuspend_delay(&pdev->dev, 50);
	pm_runtime_use_autosuspend(&pdev->dev);