summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMulin Chao <mlchao@nuvoton.com>2016-08-23 08:24:10 -0700
committerchrome-bot <chrome-bot@chromium.org>2016-08-23 15:36:32 -0700
commit862a325fa02357cd9b88619865ce88281d573e93 (patch)
tree1e3dd4f6a6b2a46df9f2fb710d25f1223f13dea6
parent072d333f100f29b696e8b6be14babfae063bfcbc (diff)
downloadchrome-ec-862a325fa02357cd9b88619865ce88281d573e93.tar.gz
npcx: gpio: Enable wake GPIO interrupts prior to hibernate
This is necessary after the pending patch to not enable all GPIO interrupts by default. BRANCH=None BUG=chrome-os-partner:56486 TEST=Manual on kevin, run 'hibernate', attach AC and verify wake occurs. Change-Id: I04d2c6edf9fb32b1a6a7e6a5ed4d2c53895e00f0 Signed-off-by: Shawn Nematbakhsh <shawnn@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/374179 Commit-Ready: Shawn N <shawnn@chromium.org> Tested-by: Shawn N <shawnn@chromium.org> Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
-rw-r--r--chip/npcx/system.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/chip/npcx/system.c b/chip/npcx/system.c
index f9d4d1f584..ec0847cb34 100644
--- a/chip/npcx/system.c
+++ b/chip/npcx/system.c
@@ -336,8 +336,11 @@ void system_set_gpios_and_wakeup_inputs_hibernate(void)
}
/* Enable wake-up inputs of hibernate_wake_pins array */
- for (i = 0; i < hibernate_wake_pins_used; i++)
+ for (i = 0; i < hibernate_wake_pins_used; i++) {
gpio_reset(hibernate_wake_pins[i]);
+ /* Re-enable interrupt for wake-up inputs */
+ gpio_enable_interrupt(hibernate_wake_pins[i]);
+ }
}
/**