aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mmc/host
diff options
context:
space:
mode:
authorLinus Walleij <linus.walleij@linaro.org>2014-10-02 03:08:46 -0400
committerUlf Hansson <ulf.hansson@linaro.org>2014-10-02 05:51:26 -0400
commit89168b48991537bec2573b3b6a8841df74465b12 (patch)
treef79f45a7a70b995da2fb0d7de39809dc8d2bd273 /drivers/mmc/host
parent6a98f1e83a2874a189754ded5254ae687828739e (diff)
mmc: core: restore detect line inversion semantics
commit 98e90de99a0c43bd434da814c882c4332441871e "mmc: host: switch OF parser to use gpio descriptors" switched the semantic behaviour of card detect and read only flags such that the inversion capability flag would only be set if inversion was explicitly specified in the device tree, in the hopes that no-one was using double inversion. It turns out that the XOR:ing between the explicit inversion was indeed in use, so we need to restore the old semantics where both ways of inversion are checked and the end result XOR:ed. Reported-by: Javier Martinez Canillas <javier@dowhile0.org> Tested-by: Javier Martinez Canillas <javier@dowhile0.org> Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Diffstat (limited to 'drivers/mmc/host')
-rw-r--r--drivers/mmc/host/mmci.c4
-rw-r--r--drivers/mmc/host/sdhci-acpi.c2
2 files changed, 3 insertions, 3 deletions
diff --git a/drivers/mmc/host/mmci.c b/drivers/mmc/host/mmci.c
index c9dafed550f2..43af791e2e45 100644
--- a/drivers/mmc/host/mmci.c
+++ b/drivers/mmc/host/mmci.c
@@ -1682,7 +1682,7 @@ static int mmci_probe(struct amba_device *dev,
1682 * silently of these do not exist and proceed to try platform data 1682 * silently of these do not exist and proceed to try platform data
1683 */ 1683 */
1684 if (!np) { 1684 if (!np) {
1685 ret = mmc_gpiod_request_cd(mmc, "cd", 0, false, 0); 1685 ret = mmc_gpiod_request_cd(mmc, "cd", 0, false, 0, NULL);
1686 if (ret < 0) { 1686 if (ret < 0) {
1687 if (ret == -EPROBE_DEFER) 1687 if (ret == -EPROBE_DEFER)
1688 goto clk_disable; 1688 goto clk_disable;
@@ -1693,7 +1693,7 @@ static int mmci_probe(struct amba_device *dev,
1693 } 1693 }
1694 } 1694 }
1695 1695
1696 ret = mmc_gpiod_request_ro(mmc, "wp", 0, false, 0); 1696 ret = mmc_gpiod_request_ro(mmc, "wp", 0, false, 0, NULL);
1697 if (ret < 0) { 1697 if (ret < 0) {
1698 if (ret == -EPROBE_DEFER) 1698 if (ret == -EPROBE_DEFER)
1699 goto clk_disable; 1699 goto clk_disable;
diff --git a/drivers/mmc/host/sdhci-acpi.c b/drivers/mmc/host/sdhci-acpi.c
index 3483c089baa7..327bc24ec8ce 100644
--- a/drivers/mmc/host/sdhci-acpi.c
+++ b/drivers/mmc/host/sdhci-acpi.c
@@ -352,7 +352,7 @@ static int sdhci_acpi_probe(struct platform_device *pdev)
352 if (sdhci_acpi_flag(c, SDHCI_ACPI_SD_CD)) { 352 if (sdhci_acpi_flag(c, SDHCI_ACPI_SD_CD)) {
353 bool v = sdhci_acpi_flag(c, SDHCI_ACPI_SD_CD_OVERRIDE_LEVEL); 353 bool v = sdhci_acpi_flag(c, SDHCI_ACPI_SD_CD_OVERRIDE_LEVEL);
354 354
355 if (mmc_gpiod_request_cd(host->mmc, NULL, 0, v, 0)) { 355 if (mmc_gpiod_request_cd(host->mmc, NULL, 0, v, 0, NULL)) {
356 dev_warn(dev, "failed to setup card detect gpio\n"); 356 dev_warn(dev, "failed to setup card detect gpio\n");
357 c->use_runtime_pm = false; 357 c->use_runtime_pm = false;
358 } 358 }