mmc: sdhci-pltfm: Support optional pm properties
authorAbhilash Kesavan <a.kesavan@samsung.com>
Mon, 19 Nov 2012 04:56:20 +0000 (10:26 +0530)
committerChris Ball <cjb@laptop.org>
Thu, 6 Dec 2012 18:54:53 +0000 (13:54 -0500)
Add support for optional pm capabilities such as MMC_PM_KEEP_POWER
and MMC_PM_WAKE_SDIO_IRQ.

Signed-off-by: Abhilash Kesavan <a.kesavan@samsung.com>
Signed-off-by: Chris Ball <cjb@laptop.org>
drivers/mmc/host/sdhci-pltfm.c

index 27164457f861dce37da3e12b00b399bf81b00e1e..c6c3b12435979c8237cb9f5f7c11f26f6cceac92 100644 (file)
@@ -89,6 +89,12 @@ void sdhci_get_of_property(struct platform_device *pdev)
                clk = of_get_property(np, "clock-frequency", &size);
                if (clk && size == sizeof(*clk) && *clk)
                        pltfm_host->clock = be32_to_cpup(clk);
+
+               if (of_find_property(np, "keep-power-in-suspend", NULL))
+                       host->mmc->pm_caps |= MMC_PM_KEEP_POWER;
+
+               if (of_find_property(np, "enable-sdio-wakeup", NULL))
+                       host->mmc->pm_caps |= MMC_PM_WAKE_SDIO_IRQ;
        }
 }
 #else