[PATCH 09/11 v3] mmc: pxamci: Delete platform data handling of CD and WP

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.

Cc: Daniel Mack <daniel@xxxxxxxxxx>
Cc: Robert Jarzmik <robert.jarzmik@xxxxxxx>
Cc: Bartosz Golaszewski <brgl@xxxxxxxx>
Cc: Andrea Adami <andrea.adami@xxxxxxxxx>
Signed-off-by: Linus Walleij <linus.walleij@xxxxxxxxxx>
---
ChangeLog v1->v3:
- Split out as separate patch at Robert's request.
---
 drivers/mmc/host/pxamci.c                | 19 -------------------
 include/linux/platform_data/mmc-pxamci.h |  2 --
 2 files changed, 21 deletions(-)

diff --git a/drivers/mmc/host/pxamci.c b/drivers/mmc/host/pxamci.c
index baed636870e0..a8b6c14f2687 100644
--- a/drivers/mmc/host/pxamci.c
+++ b/drivers/mmc/host/pxamci.c
@@ -730,8 +730,6 @@ static int pxamci_probe(struct platform_device *pdev)
 	}
 
 	if (host->pdata) {
-		int gpio_cd = host->pdata->gpio_card_detect;
-		int gpio_ro = host->pdata->gpio_card_ro;
 		int gpio_power = host->pdata->gpio_power;
 
 		host->detect_delay_ms = host->pdata->detect_delay_ms;
@@ -755,29 +753,12 @@ static int pxamci_probe(struct platform_device *pdev)
 			dev_err(dev, "Failed requesting gpio_cd\n");
 			goto out;
 		}
-		if (ret == -ENOENT && gpio_is_valid(gpio_cd)) {
-			ret = mmc_gpio_request_cd(mmc, gpio_cd, 0);
-			if (ret) {
-				dev_err(dev, "Failed requesting gpio_cd %d\n",
-					gpio_cd);
-			}
-		}
 
 		ret = mmc_gpiod_request_ro(mmc, "wp", 0, false, 0, NULL);
 		if (ret && ret != -ENOENT) {
 			dev_err(dev, "Failed requesting gpio_ro\n");
 			goto out;
 		}
-		/* Try platform data instead */
-		if (if ret == -ENOENT && gpio_is_valid(gpio_ro)) {
-			ret = mmc_gpio_request_ro(mmc, gpio_ro);
-			if (ret) {
-				dev_err(dev,
-					"Failed requesting gpio_ro %d\n",
-					gpio_ro);
-				goto out;
-			}
-		}
 		if (!ret) {
 			host->use_ro_gpio = true;
 			mmc->caps2 |= host->pdata->gpio_card_ro_invert ?
diff --git a/include/linux/platform_data/mmc-pxamci.h b/include/linux/platform_data/mmc-pxamci.h
index 752f97c62ef2..db6c247d42d1 100644
--- a/include/linux/platform_data/mmc-pxamci.h
+++ b/include/linux/platform_data/mmc-pxamci.h
@@ -15,8 +15,6 @@ struct pxamci_platform_data {
 	int (*get_ro)(struct device *);
 	int (*setpower)(struct device *, unsigned int);
 	void (*exit)(struct device *, void *);
-	int gpio_card_detect;			/* gpio detecting card insertion */
-	int gpio_card_ro;			/* gpio detecting read only toggle */
 	bool gpio_card_ro_invert;		/* gpio ro is inverted */
 	int gpio_power;				/* gpio powering up MMC bus */
 	bool gpio_power_invert;			/* gpio power is inverted */
-- 
2.19.1




[Index of Archives]     [Linux Memonry Technology]     [Linux USB Devel]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux