提交 451931ea 编写于 作者: T T Karthik Reddy 提交者: Peng Fan

mmc: sdhci: Read cd-gpio from devicetree

This patch reads cd-gpio property from devicetree
Signed-off-by: NT Karthik Reddy <t.karthik.reddy@xilinx.com>
Signed-off-by: NMichal Simek <michal.simek@xilinx.com>
Reviewed-by: NPeng Fan <peng.fan@nxp.com>
上级 86a94e7b
...@@ -590,6 +590,12 @@ static int sdhci_set_ios(struct mmc *mmc) ...@@ -590,6 +590,12 @@ static int sdhci_set_ios(struct mmc *mmc)
static int sdhci_init(struct mmc *mmc) static int sdhci_init(struct mmc *mmc)
{ {
struct sdhci_host *host = mmc->priv; 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
sdhci_reset(host, SDHCI_RESET_ALL); sdhci_reset(host, SDHCI_RESET_ALL);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册