aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMugunthan V N2016-04-04 17:28:01 +0530
committerTom Rini2016-04-18 12:29:16 -0400
commit5cc6a2458e33bb1b99b323ef1f69b5446820d8d7 (patch)
tree5fc25c7f588520503088d5aa91b2b848941c57ba
parent4bc5e19e124636c695459ffe3f654513ba93105a (diff)
drivers: mmc: omap_hsmmc: request cd and wp gpios when DM_MMC is defined
Add request gpio for CD and WP gpios, so that the gpio can be used for the respective purposes. Signed-off-by: Mugunthan V N <mugunthanvnm@ti.com> Reviewed-by: Tom Rini <trini@konsulko.com>
-rw-r--r--drivers/mmc/omap_hsmmc.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/mmc/omap_hsmmc.c b/drivers/mmc/omap_hsmmc.c
index 10713141577..85a832bd420 100644
--- a/drivers/mmc/omap_hsmmc.c
+++ b/drivers/mmc/omap_hsmmc.c
@@ -820,6 +820,11 @@ static int omap_hsmmc_probe(struct udevice *dev)
if (mmc == NULL)
return -1;
+#ifdef OMAP_HSMMC_USE_GPIO
+ gpio_request_by_name(dev, "cd-gpios", 0, &priv->cd_gpio, GPIOD_IS_IN);
+ gpio_request_by_name(dev, "wp-gpios", 0, &priv->wp_gpio, GPIOD_IS_IN);
+#endif
+
upriv->mmc = mmc;
return 0;