mmc: sdhci-esdhc-imx: add sdio wakeup feature
Subsystems (4)
[email protected]
maintainerPATCH 1/1 mmc: sdhci-esdhc-imx: add sdio wakeup feature
From: Haibo Chen <[email protected]>
Set the wakeup capability for the SDIO device which can wakeup system. And user can enable this wakeup through sysfs interface.
Signed-off-by Haibo Chen <[email protected]>
--- drivers/mmc/host/sdhci-esdhc-imx.c | 8 ++++++++ 1 file changed, 8 insertions(+)
drivers/mmc/host/sdhci-esdhc-imx.c +8 -0
@@ -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);
Signature · 1 line
2.17.1
Quoted 7 lines · On Thu, 10 Jun 2021 at 14:19, <[email protected]> wrote:
From: Haibo Chen <[email protected]>
Set the wakeup capability for the SDIO device which can wakeup system. And user can enable this wakeup through sysfs interface.
Signed-off-by Haibo Chen <[email protected]>
Applied for next, thanks!
Kind regards
Uffe
Quoted 26 lines
--- drivers/mmc/host/sdhci-esdhc-imx.c | 8 ++++++++ 1 file changed, 8 insertions(+)drivers/mmc/host/sdhci-esdhc-imx.c +8
-1@@ -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); --2.17.1