diff options
author | Rabin Vincent <rabin.vincent@stericsson.com> | 2010-08-09 12:54:43 +0100 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2010-08-26 19:54:27 +0100 |
commit | 2971944582ff43b7dedbb460777052243ac9915a (patch) | |
tree | 1f5a05fed4b3f386e6468a2d52ba087e20d6bcd2 /drivers/mmc/host/mmci.c | |
parent | d4348c678977c7093438bbbf2067c49396ae941b (diff) | |
download | kernel_samsung_smdk4412-2971944582ff43b7dedbb460777052243ac9915a.zip kernel_samsung_smdk4412-2971944582ff43b7dedbb460777052243ac9915a.tar.gz kernel_samsung_smdk4412-2971944582ff43b7dedbb460777052243ac9915a.tar.bz2 |
ARM: 6307/1: mmci: allow the card detect GPIO value not to be inverted
On some platforms, the GPIO value from the gpio_cd pin doesn't need to
be inverted to get it active high. Add a cd_invert platform data
parameter and change existing platforms using GPIO for CD (only
Realview) to enable it.
Acked-by: Linus Walleij <linus.walleij@stericsson.com>
Signed-off-by: Rabin Vincent <rabin.vincent@stericsson.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'drivers/mmc/host/mmci.c')
-rw-r--r-- | drivers/mmc/host/mmci.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/mmc/host/mmci.c b/drivers/mmc/host/mmci.c index 840b301..9a9aeac 100644 --- a/drivers/mmc/host/mmci.c +++ b/drivers/mmc/host/mmci.c @@ -570,12 +570,13 @@ static int mmci_get_ro(struct mmc_host *mmc) static int mmci_get_cd(struct mmc_host *mmc) { struct mmci_host *host = mmc_priv(mmc); + struct mmci_platform_data *plat = host->plat; unsigned int status; if (host->gpio_cd == -ENOSYS) - status = host->plat->status(mmc_dev(host->mmc)); + status = plat->status(mmc_dev(host->mmc)); else - status = !gpio_get_value(host->gpio_cd); + status = !!gpio_get_value(host->gpio_cd) ^ plat->cd_invert; /* * Use positive logic throughout - status is zero for no card, |