]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
ENGR00295184-3 mmc: sdhci-esdhc-imx: add keep power feature during suspend
authorDong Aisheng <b29396@freescale.com>
Mon, 13 Jan 2014 08:26:19 +0000 (16:26 +0800)
committerLothar Waßmann <LW@KARO-electronics.de>
Wed, 20 Aug 2014 08:06:54 +0000 (10:06 +0200)
IMX boards can keep power for cards during suspend.
User can enable it from device tree.

Signed-off-by: Dong Aisheng <b29396@freescale.com>
drivers/mmc/host/sdhci-esdhc-imx.c

index 73c26ecbff5e940a4f057a4b04e0c0c3e8977126..94139fdbb36dea4ef2f3c938a0d81985b1323cc3 100644 (file)
@@ -937,6 +937,7 @@ sdhci_esdhc_imx_probe_dt(struct platform_device *pdev,
                         struct esdhc_platform_data *boarddata)
 {
        struct device_node *np = pdev->dev.of_node;
+       struct sdhci_host *host = platform_get_drvdata(pdev);
 
        if (!np)
                return -ENODEV;
@@ -970,6 +971,9 @@ sdhci_esdhc_imx_probe_dt(struct platform_device *pdev,
        if (of_property_read_u32(np, "fsl,delay-line", &boarddata->delay_line))
                boarddata->delay_line = 0;
 
+       if (of_find_property(np, "keep-power-in-suspend", NULL))
+               host->mmc->pm_caps |= MMC_PM_KEEP_POWER;
+
        return 0;
 }
 #else