Re: [PATCH] mmc: sdhci: pxav3: Delete GPIO handling

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

 



On 23/09/18 10:03, Linus Walleij wrote:
> 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@xxxxxxxxxxx>
> Cc: Adrian Hunter <adrian.hunter@xxxxxxxxx>
> Signed-off-by: Linus Walleij <linus.walleij@xxxxxxxxxx>

Acked-by: Adrian Hunter <adrian.hunter@xxxxxxxxx>

> ---
>  drivers/mmc/host/sdhci-pxav3.c          | 14 --------------
>  include/linux/platform_data/pxa_sdhci.h |  4 ----
>  2 files changed, 18 deletions(-)
> 
> diff --git a/drivers/mmc/host/sdhci-pxav3.c b/drivers/mmc/host/sdhci-pxav3.c
> index b8e96f392428..1783e29eae04 100644
> --- a/drivers/mmc/host/sdhci-pxav3.c
> +++ b/drivers/mmc/host/sdhci-pxav3.c
> @@ -21,17 +21,14 @@
>  #include <linux/platform_device.h>
>  #include <linux/clk.h>
>  #include <linux/io.h>
> -#include <linux/gpio.h>
>  #include <linux/mmc/card.h>
>  #include <linux/mmc/host.h>
> -#include <linux/mmc/slot-gpio.h>
>  #include <linux/platform_data/pxa_sdhci.h>
>  #include <linux/slab.h>
>  #include <linux/delay.h>
>  #include <linux/module.h>
>  #include <linux/of.h>
>  #include <linux/of_device.h>
> -#include <linux/of_gpio.h>
>  #include <linux/pm.h>
>  #include <linux/pm_runtime.h>
>  #include <linux/mbus.h>
> @@ -452,16 +449,6 @@ static int sdhci_pxav3_probe(struct platform_device *pdev)
>  			host->mmc->caps2 |= pdata->host_caps2;
>  		if (pdata->pm_caps)
>  			host->mmc->pm_caps |= pdata->pm_caps;
> -
> -		if (gpio_is_valid(pdata->ext_cd_gpio)) {
> -			ret = mmc_gpio_request_cd(host->mmc, pdata->ext_cd_gpio,
> -						  0);
> -			if (ret) {
> -				dev_err(mmc_dev(host->mmc),
> -					"failed to allocate card detect gpio\n");
> -				goto err_cd_req;
> -			}
> -		}
>  	}
>  
>  	pm_runtime_get_noresume(&pdev->dev);
> @@ -486,7 +473,6 @@ static int sdhci_pxav3_probe(struct platform_device *pdev)
>  	pm_runtime_disable(&pdev->dev);
>  	pm_runtime_put_noidle(&pdev->dev);
>  err_of_parse:
> -err_cd_req:
>  err_mbus_win:
>  	clk_disable_unprepare(pxa->clk_io);
>  	clk_disable_unprepare(pxa->clk_core);
> diff --git a/include/linux/platform_data/pxa_sdhci.h b/include/linux/platform_data/pxa_sdhci.h
> index 9e20c2fb4ffd..4977c06d8a86 100644
> --- a/include/linux/platform_data/pxa_sdhci.h
> +++ b/include/linux/platform_data/pxa_sdhci.h
> @@ -33,8 +33,6 @@
>   *	1: choose feedback clk + delay value
>   *	2: choose internal clk
>   * @clk_delay_enable: enable clk_delay or not, used on pxa910
> - * @ext_cd_gpio: gpio pin used for external CD line
> - * @ext_cd_gpio_invert: invert values for external CD gpio line
>   * @max_speed: the maximum speed supported
>   * @host_caps: Standard MMC host capabilities bit field.
>   * @quirks: quirks of platfrom
> @@ -46,8 +44,6 @@ struct sdhci_pxa_platdata {
>  	unsigned int	clk_delay_cycles;
>  	unsigned int	clk_delay_sel;
>  	bool		clk_delay_enable;
> -	unsigned int	ext_cd_gpio;
> -	bool		ext_cd_gpio_invert;
>  	unsigned int	max_speed;
>  	u32		host_caps;
>  	u32		host_caps2;
> 




[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