summaryrefslogtreecommitdiff
path: root/chip/mec1322
diff options
context:
space:
mode:
authorAnton Staaf <robotboy@chromium.org>2016-01-13 11:14:23 -0800
committerchrome-bot <chrome-bot@chromium.org>2016-01-19 14:24:40 -0800
commit6e4e1ccc8217ac8b318b885dae78b3c1996ca71e (patch)
tree02740e3467d89dce03726f6c6ed78d149b56335d /chip/mec1322
parente933d0b7b6984bc8abf40b3364695d9955a9a426 (diff)
downloadchrome-ec-6e4e1ccc8217ac8b318b885dae78b3c1996ca71e.tar.gz
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 <robotboy@chromium.org> BRANCH=None BUG=None TEST=make buildall -j Change-Id: Ie24e8e8a96d0ff50f521a918e80ed2b379f8c1a9 Reviewed-on: https://chromium-review.googlesource.com/321951 Commit-Ready: Anton Staaf <robotboy@chromium.org> Tested-by: Anton Staaf <robotboy@chromium.org> Reviewed-by: Randall Spangler <rspangler@chromium.org>
Diffstat (limited to 'chip/mec1322')
-rw-r--r--chip/mec1322/uart.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/chip/mec1322/uart.c b/chip/mec1322/uart.c
index 3fdb156188..d9922b8ca4 100644
--- a/chip/mec1322/uart.c
+++ b/chip/mec1322/uart.c
@@ -172,8 +172,6 @@ void uart_init(void)
#ifdef CONFIG_LOW_POWER_IDLE
void uart_enter_dsleep(void)
{
- const struct gpio_info g = gpio_list[GPIO_UART0_RX];
-
/* Disable the UART interrupt. */
task_disable_irq(MEC1322_IRQ_UART); /* NVIC interrupt for UART=13 */
@@ -181,8 +179,7 @@ void uart_enter_dsleep(void)
* Set the UART0 RX pin to be a GPIO-162(fixed pin) interrupt
* with the flags defined in the gpio.inc 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);
/* power-down/de-activate UART0 */
MEC1322_UART_ACT &= ~(1 << 0);