summaryrefslogtreecommitdiff
path: root/chip/lm4/gpio.c
diff options
context:
space:
mode:
authorRandall Spangler <rspangler@chromium.org>2012-01-26 13:39:36 -0800
committerRandall Spangler <rspangler@chromium.org>2012-01-26 13:39:36 -0800
commitc4a867984ef707d974f95f4f06f80c4b04db3bc2 (patch)
treed62bea2a735cbcd2ded84395624f44aef8b3c025 /chip/lm4/gpio.c
parent028150a0591c899feae6ec08fcd7efd685ca80ee (diff)
downloadchrome-ec-c4a867984ef707d974f95f4f06f80c4b04db3bc2.tar.gz
Fix missing GPIO interrupts
Signed-off-by: Randall Spangler <rspangler@chromium.org> BUG=none TEST=push and release power button; should see debug messages Change-Id: I4a08b56247baa85555514623db7a04ab4638ca0e
Diffstat (limited to 'chip/lm4/gpio.c')
-rw-r--r--chip/lm4/gpio.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/chip/lm4/gpio.c b/chip/lm4/gpio.c
index c637f26b1e..9cc0d30d51 100644
--- a/chip/lm4/gpio.c
+++ b/chip/lm4/gpio.c
@@ -87,6 +87,9 @@ int gpio_pre_init(void)
/* Set all GPIOs to defaults */
for (i = 0; i < GPIO_COUNT; i++, g++) {
+ /* Use as GPIO, not alternate function */
+ gpio_set_alternate_function(g->port, g->mask, 0);
+
/* Handle GPIO direction */
if (g->flags & GPIO_OUTPUT) {
/* Output with default level */
@@ -103,9 +106,6 @@ int gpio_pre_init(void)
}
}
- /* Use as GPIO, not alternate function */
- gpio_set_alternate_function(g->port, g->mask, 0);
-
/* Set up interrupts if necessary */
if (g->flags & GPIO_INT_LEVEL)
LM4_GPIO_IS(g->port) |= g->mask;