From 6e4e1ccc8217ac8b318b885dae78b3c1996ca71e Mon Sep 17 00:00:00 2001 From: Anton Staaf Date: Wed, 13 Jan 2016 11:14:23 -0800 Subject: GPIO: Add gpio_reset function The gpio_reset function returns a GPIO to its initialy configured state. Using it removes a few more uses of gpio_list. Signed-off-by: Anton Staaf BRANCH=None BUG=None TEST=make buildall -j Change-Id: Ie24e8e8a96d0ff50f521a918e80ed2b379f8c1a9 Reviewed-on: https://chromium-review.googlesource.com/321951 Commit-Ready: Anton Staaf Tested-by: Anton Staaf Reviewed-by: Randall Spangler --- chip/lm4/uart.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'chip/lm4/uart.c') diff --git a/chip/lm4/uart.c b/chip/lm4/uart.c index befe0ec398..6ceffb4acb 100644 --- a/chip/lm4/uart.c +++ b/chip/lm4/uart.c @@ -243,8 +243,7 @@ void uart_enter_dsleep(void) * Set the UART0 RX pin to be a generic GPIO with the flags defined * in the board.c file. */ - gpio_set_flags_by_mask(g.port, g.mask, g.flags); - gpio_set_alternate_function(g.port, g.mask, -1); + gpio_reset(GPIO_UART0_RX); /* Clear any pending GPIO interrupts on the UART0 RX pin. */ LM4_GPIO_ICR(g.port) = g.mask; -- cgit v1.2.1