summaryrefslogtreecommitdiffstats
path: root/drivers/mmc
diff options
context:
space:
mode:
authorHaavard Skinnemoen <haavard.skinnemoen@atmel.com>2008-09-19 21:09:30 +0200
committerPierre Ossman <drzeus@drzeus.cx>2008-09-20 12:12:23 +0200
commitda45b66ec89bbf3a1c172688c35d4d3a6e8e757f (patch)
treeb338b38ccc89872cf51c4b204c7222477c65625b /drivers/mmc
parent75d33cc751214f8388d58fca3ef6d1df786b5861 (diff)
downloadblackbird-op-linux-da45b66ec89bbf3a1c172688c35d4d3a6e8e757f.tar.gz
blackbird-op-linux-da45b66ec89bbf3a1c172688c35d4d3a6e8e757f.zip
atmel-mci: Set MMC_CAP_NEEDS_POLL if no detect_pin
This allows the mmc core to detect card insertion/removal for slots that don't have any CD pin wired up. Signed-off-by: Haavard Skinnemoen <haavard.skinnemoen@atmel.com> Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
Diffstat (limited to 'drivers/mmc')
-rw-r--r--drivers/mmc/host/atmel-mci.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/mmc/host/atmel-mci.c b/drivers/mmc/host/atmel-mci.c
index 39096083bb61..917035e16da4 100644
--- a/drivers/mmc/host/atmel-mci.c
+++ b/drivers/mmc/host/atmel-mci.c
@@ -1059,6 +1059,10 @@ static int __init atmci_probe(struct platform_device *pdev)
host->present = !gpio_get_value(host->detect_pin);
}
}
+
+ if (!gpio_is_valid(host->detect_pin))
+ mmc->caps |= MMC_CAP_NEEDS_POLL;
+
if (gpio_is_valid(host->wp_pin)) {
if (gpio_request(host->wp_pin, "mmc_wp")) {
dev_dbg(&mmc->class_dev, "no WP pin available\n");
OpenPOWER on IntegriCloud