> Subject: [PATCH v2 2/3] mmc: sdhci: Read cd-gpio from devicetree
> 
> From: T Karthik Reddy <t.karthik.re...@xilinx.com>
> 
> This patch reads cd-gpio property from devicetree
> 
> Signed-off-by: T Karthik Reddy <t.karthik.re...@xilinx.com>
> Signed-off-by: Michal Simek <michal.si...@xilinx.com>
> ---
> 
> Changes in v2:
>  - Created a new patch for reading "cd-gpio" property from DT.
> 
>  drivers/mmc/sdhci.c | 6 ++++++
>  1 file changed, 6 insertions(+)
> 
> diff --git a/drivers/mmc/sdhci.c b/drivers/mmc/sdhci.c index
> e2bb90abbdf3..4ffe74e35e08 100644
> --- a/drivers/mmc/sdhci.c
> +++ b/drivers/mmc/sdhci.c
> @@ -590,6 +590,12 @@ static int sdhci_set_ios(struct mmc *mmc)  static
> int sdhci_init(struct mmc *mmc)  {
>       struct sdhci_host *host = mmc->priv;
> +#if CONFIG_IS_ENABLED(DM_MMC) && CONFIG_IS_ENABLED(DM_GPIO)
> +     struct udevice *dev = mmc->dev;
> +
> +     gpio_request_by_name(dev, "cd-gpio", 0,
> +                          &host->cd_gpio, GPIOD_IS_IN);
> +#endif

Reviewed-by: Peng Fan <peng....@nxp.com>

> 
>       sdhci_reset(host, SDHCI_RESET_ALL);
> 
> --
> 2.17.1

_______________________________________________
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot

Reply via email to