* [PATCH] mmc: sdhci-esdhc-imx: add sdio wakeup feature
@ 2021-06-10 12:01 haibo.chen
2021-06-11 7:40 ` Ulf Hansson
0 siblings, 1 reply; 2+ messages in thread
From: haibo.chen @ 2021-06-10 12:01 UTC (permalink / raw)
To: adrian.hunter, ulf.hansson
Cc: shawnguo, s.hauer, kernel, festevam, linux-mmc, linux-imx, haibo.chen
From: Haibo Chen <haibo.chen@nxp.com>
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 <haibo.chen@nxp.com>
---
drivers/mmc/host/sdhci-esdhc-imx.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/drivers/mmc/host/sdhci-esdhc-imx.c b/drivers/mmc/host/sdhci-esdhc-imx.c
index 7336ae749137..72c0bf0c1887 100644
--- a/drivers/mmc/host/sdhci-esdhc-imx.c
+++ b/drivers/mmc/host/sdhci-esdhc-imx.c
@@ -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
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] mmc: sdhci-esdhc-imx: add sdio wakeup feature
2021-06-10 12:01 [PATCH] mmc: sdhci-esdhc-imx: add sdio wakeup feature haibo.chen
@ 2021-06-11 7:40 ` Ulf Hansson
0 siblings, 0 replies; 2+ messages in thread
From: Ulf Hansson @ 2021-06-11 7:40 UTC (permalink / raw)
To: Haibo Chen
Cc: Adrian Hunter, Shawn Guo, Sascha Hauer, Sascha Hauer,
Fabio Estevam, linux-mmc, dl-linux-imx
On Thu, 10 Jun 2021 at 14:19, <haibo.chen@nxp.com> wrote:
>
> From: Haibo Chen <haibo.chen@nxp.com>
>
> 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 <haibo.chen@nxp.com>
Applied for next, thanks!
Kind regards
Uffe
> ---
> drivers/mmc/host/sdhci-esdhc-imx.c | 8 ++++++++
> 1 file changed, 8 insertions(+)
>
> diff --git a/drivers/mmc/host/sdhci-esdhc-imx.c b/drivers/mmc/host/sdhci-esdhc-imx.c
> index 7336ae749137..72c0bf0c1887 100644
> --- a/drivers/mmc/host/sdhci-esdhc-imx.c
> +++ b/drivers/mmc/host/sdhci-esdhc-imx.c
> @@ -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
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-06-11 7:41 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-10 12:01 [PATCH] mmc: sdhci-esdhc-imx: add sdio wakeup feature haibo.chen
2021-06-11 7:40 ` Ulf Hansson
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.