Skip to content

Commit

Permalink
atmel-mci: Set MMC_CAP_NEEDS_POLL if no detect_pin
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Haavard Skinnemoen authored and Pierre Ossman committed Sep 20, 2008
1 parent 75d33cc commit da45b66
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions drivers/mmc/host/atmel-mci.c
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down

0 comments on commit da45b66

Please sign in to comment.