Skip to content

Commit 80a68f3

Browse files
linuswstorulf
authored andcommitted
mmc: pxamci: Delete platform data handling of CD and WP
This deletes the code dealing with handling card detect and write protect passed in as platform data and makes the host rely on just GPIO descriptors. The card read only inversion flag has to be kept around for now, as the core cannot handle the inversion flags on the descriptors yet. Since we can now rely on the descriptors to have the right polarity, we set the "override_active_level" to false in mmc_gpiod_request_cd() and mmc_gpiod_request_ro(). Cc: Daniel Mack <daniel@zonque.org> Cc: Robert Jarzmik <robert.jarzmik@free.fr> Cc: Bartosz Golaszewski <brgl@bgdev.pl> Cc: Andrea Adami <andrea.adami@gmail.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Acked-by: Robert Jarzmik <robert.jarzmik@free.fr> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
1 parent e114cd3 commit 80a68f3

File tree

2 files changed

+0
-21
lines changed

2 files changed

+0
-21
lines changed

drivers/mmc/host/pxamci.c

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -730,8 +730,6 @@ static int pxamci_probe(struct platform_device *pdev)
730730
}
731731

732732
if (host->pdata) {
733-
int gpio_cd = host->pdata->gpio_card_detect;
734-
int gpio_ro = host->pdata->gpio_card_ro;
735733
int gpio_power = host->pdata->gpio_power;
736734

737735
host->detect_delay_ms = host->pdata->detect_delay_ms;
@@ -755,29 +753,12 @@ static int pxamci_probe(struct platform_device *pdev)
755753
dev_err(dev, "Failed requesting gpio_cd\n");
756754
goto out;
757755
}
758-
if (ret == -ENOENT && gpio_is_valid(gpio_cd)) {
759-
ret = mmc_gpio_request_cd(mmc, gpio_cd, 0);
760-
if (ret) {
761-
dev_err(dev, "Failed requesting gpio_cd %d\n",
762-
gpio_cd);
763-
}
764-
}
765756

766757
ret = mmc_gpiod_request_ro(mmc, "wp", 0, false, 0, NULL);
767758
if (ret && ret != -ENOENT) {
768759
dev_err(dev, "Failed requesting gpio_ro\n");
769760
goto out;
770761
}
771-
/* Try platform data instead */
772-
if (ret == -ENOENT && gpio_is_valid(gpio_ro)) {
773-
ret = mmc_gpio_request_ro(mmc, gpio_ro);
774-
if (ret) {
775-
dev_err(dev,
776-
"Failed requesting gpio_ro %d\n",
777-
gpio_ro);
778-
goto out;
779-
}
780-
}
781762
if (!ret) {
782763
host->use_ro_gpio = true;
783764
mmc->caps2 |= host->pdata->gpio_card_ro_invert ?

include/linux/platform_data/mmc-pxamci.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,6 @@ struct pxamci_platform_data {
1515
int (*get_ro)(struct device *);
1616
int (*setpower)(struct device *, unsigned int);
1717
void (*exit)(struct device *, void *);
18-
int gpio_card_detect; /* gpio detecting card insertion */
19-
int gpio_card_ro; /* gpio detecting read only toggle */
2018
bool gpio_card_ro_invert; /* gpio ro is inverted */
2119
int gpio_power; /* gpio powering up MMC bus */
2220
bool gpio_power_invert; /* gpio power is inverted */

0 commit comments

Comments
 (0)