Skip to content

Commit 43b7358

Browse files
linuswstorulf
authored andcommitted
mmc: sdhci: pxav3: Delete GPIO handling
The platform data for the PXAv3 driver allows passing a card detect GPIO, but this code is not used in the kernel. In order to not encourage the use of the old global GPIO numberspace we need to remove this. Card detect (and write protect) GPIO can easily be added into the driver using machine descriptor tables instead, and the descriptor-based (gpiod) variants of the slot GPIO APIs. Cc: Jisheng Zhang <jszhang@marvell.com> Cc: Adrian Hunter <adrian.hunter@intel.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Reviewed-by: Jisheng Zhang <Jisheng.Zhang@synaptics.com> Acked-by: Adrian Hunter <adrian.hunter@intel.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
1 parent b007c4c commit 43b7358

File tree

2 files changed

+0
-18
lines changed

2 files changed

+0
-18
lines changed

drivers/mmc/host/sdhci-pxav3.c

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -21,17 +21,14 @@
2121
#include <linux/platform_device.h>
2222
#include <linux/clk.h>
2323
#include <linux/io.h>
24-
#include <linux/gpio.h>
2524
#include <linux/mmc/card.h>
2625
#include <linux/mmc/host.h>
27-
#include <linux/mmc/slot-gpio.h>
2826
#include <linux/platform_data/pxa_sdhci.h>
2927
#include <linux/slab.h>
3028
#include <linux/delay.h>
3129
#include <linux/module.h>
3230
#include <linux/of.h>
3331
#include <linux/of_device.h>
34-
#include <linux/of_gpio.h>
3532
#include <linux/pm.h>
3633
#include <linux/pm_runtime.h>
3734
#include <linux/mbus.h>
@@ -452,16 +449,6 @@ static int sdhci_pxav3_probe(struct platform_device *pdev)
452449
host->mmc->caps2 |= pdata->host_caps2;
453450
if (pdata->pm_caps)
454451
host->mmc->pm_caps |= pdata->pm_caps;
455-
456-
if (gpio_is_valid(pdata->ext_cd_gpio)) {
457-
ret = mmc_gpio_request_cd(host->mmc, pdata->ext_cd_gpio,
458-
0);
459-
if (ret) {
460-
dev_err(mmc_dev(host->mmc),
461-
"failed to allocate card detect gpio\n");
462-
goto err_cd_req;
463-
}
464-
}
465452
}
466453

467454
pm_runtime_get_noresume(&pdev->dev);
@@ -486,7 +473,6 @@ static int sdhci_pxav3_probe(struct platform_device *pdev)
486473
pm_runtime_disable(&pdev->dev);
487474
pm_runtime_put_noidle(&pdev->dev);
488475
err_of_parse:
489-
err_cd_req:
490476
err_mbus_win:
491477
clk_disable_unprepare(pxa->clk_io);
492478
clk_disable_unprepare(pxa->clk_core);

include/linux/platform_data/pxa_sdhci.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,6 @@
3333
* 1: choose feedback clk + delay value
3434
* 2: choose internal clk
3535
* @clk_delay_enable: enable clk_delay or not, used on pxa910
36-
* @ext_cd_gpio: gpio pin used for external CD line
37-
* @ext_cd_gpio_invert: invert values for external CD gpio line
3836
* @max_speed: the maximum speed supported
3937
* @host_caps: Standard MMC host capabilities bit field.
4038
* @quirks: quirks of platfrom
@@ -46,8 +44,6 @@ struct sdhci_pxa_platdata {
4644
unsigned int clk_delay_cycles;
4745
unsigned int clk_delay_sel;
4846
bool clk_delay_enable;
49-
unsigned int ext_cd_gpio;
50-
bool ext_cd_gpio_invert;
5147
unsigned int max_speed;
5248
u32 host_caps;
5349
u32 host_caps2;

0 commit comments

Comments
 (0)