diff mbox

[U-Boot,2/5] mx53ard: Use gpio_direction_input prior to gpio_get_value

Message ID 1328704485-1505-2-git-send-email-festevam@gmail.com
State Accepted
Commit 93082044a9797483ea6224c0989792710e4f5135
Delegated to: Stefano Babic
Headers show

Commit Message

Fabio Estevam Feb. 8, 2012, 12:34 p.m. UTC
Use gpio_direction_input prior to gpio_get_value.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
---
 board/freescale/mx53ard/mx53ard.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

Comments

Stefano Babic Feb. 9, 2012, 4:58 p.m. UTC | #1
On 08/02/2012 13:34, Fabio Estevam wrote:
> Use gpio_direction_input prior to gpio_get_value.
> 
> Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
> ---

Applied to u-boot-imx, thanks.

Best regards,
Stefano Babic
diff mbox

Patch

diff --git a/board/freescale/mx53ard/mx53ard.c b/board/freescale/mx53ard/mx53ard.c
index 40b5c19..e90e39e 100644
--- a/board/freescale/mx53ard/mx53ard.c
+++ b/board/freescale/mx53ard/mx53ard.c
@@ -89,7 +89,9 @@  int board_mmc_getcd(struct mmc *mmc)
 	int ret;
 
 	mxc_request_iomux(MX53_PIN_GPIO_1, IOMUX_CONFIG_ALT1);
+	gpio_direction_input(1);
 	mxc_request_iomux(MX53_PIN_GPIO_4, IOMUX_CONFIG_ALT1);
+	gpio_direction_input(4);
 
 	if (cfg->esdhc_base == MMC_SDHC1_BASE_ADDR)
 		ret = !gpio_get_value(1); /* GPIO1_1 */