aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mmc
diff options
context:
space:
mode:
authorGuennadi Liakhovetski <g.liakhovetski@gmx.de>2013-02-15 10:14:01 -0500
committerChris Ball <cjb@laptop.org>2013-02-24 14:37:25 -0500
commit2fdb6e2d9bf4b599d1cf8bc2b7874a06608fc7ee (patch)
tree66a25efb5bf89e8377d7121cd9197745656cf1d9 /drivers/mmc
parent619b08d45a40229040d6db8c9fb1f40b7e58b71f (diff)
mmc: add DT bindings for more MMC capability flags
Many MMC capability flags are platform-dependent and are traditionally set in platform data. With DT often each such capability requires a special binding. Add bindings for MMC_CAP_SD_HIGHSPEED, MMC_CAP_MMC_HIGHSPEED, MMC_CAP_POWER_OFF_CARD and MMC_CAP_SDIO_IRQ capabilities. Also add code to DT parser to look up "keep-power-in-suspend" and "enable-sdio-wakeup" bindings and set MMC_PM_KEEP_POWER and MMC_PM_WAKE_SDIO_IRQ respectively, if found. Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Chris Ball <cjb@laptop.org>
Diffstat (limited to 'drivers/mmc')
-rw-r--r--drivers/mmc/core/host.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/drivers/mmc/core/host.c b/drivers/mmc/core/host.c
index 9c53452e73e1..821cd8224137 100644
--- a/drivers/mmc/core/host.c
+++ b/drivers/mmc/core/host.c
@@ -400,6 +400,19 @@ void mmc_of_parse(struct mmc_host *host)
400 } 400 }
401 if (explicit_inv_wp ^ gpio_inv_wp) 401 if (explicit_inv_wp ^ gpio_inv_wp)
402 host->caps2 |= MMC_CAP2_RO_ACTIVE_HIGH; 402 host->caps2 |= MMC_CAP2_RO_ACTIVE_HIGH;
403
404 if (of_find_property(np, "cap-sd-highspeed", &len))
405 host->caps |= MMC_CAP_SD_HIGHSPEED;
406 if (of_find_property(np, "cap-mmc-highspeed", &len))
407 host->caps |= MMC_CAP_MMC_HIGHSPEED;
408 if (of_find_property(np, "cap-power-off-card", &len))
409 host->caps |= MMC_CAP_POWER_OFF_CARD;
410 if (of_find_property(np, "cap-sdio-irq", &len))
411 host->caps |= MMC_CAP_SDIO_IRQ;
412 if (of_find_property(np, "keep-power-in-suspend", &len))
413 host->pm_caps |= MMC_PM_KEEP_POWER;
414 if (of_find_property(np, "enable-sdio-wakeup", &len))
415 host->pm_caps |= MMC_PM_WAKE_SDIO_IRQ;
403} 416}
404 417
405EXPORT_SYMBOL(mmc_of_parse); 418EXPORT_SYMBOL(mmc_of_parse);