Message ID | 1328704485-1505-2-git-send-email-festevam@gmail.com |
---|---|
State | Accepted |
Commit | 93082044a9797483ea6224c0989792710e4f5135 |
Delegated to: | Stefano Babic |
Headers | show |
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 --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 */
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(-)