diff options
author | Wei-Ning Huang <wnhuang@google.com> | 2017-07-17 16:57:58 +0800 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2017-07-17 07:21:48 -0700 |
commit | 412093d046ec6eab64798f70bff98c8865f709d3 (patch) | |
tree | 54fa8dbe0fab6f768a4ade0d6cd3d9f304ee3afc | |
parent | ba4a67558ae76c1fe3b864eb18a5c6da6fbba666 (diff) | |
download | chrome-ec-412093d046ec6eab64798f70bff98c8865f709d3.tar.gz |
stm32: gpio: implement gpio_disable_interrupt
gpio_disable_interrupt is missing for stm32, add it so board functions
can use it.
BRANCH=none
BUG=b:63685022
TEST=`make BOARD=rose -j`
Change-Id: Ibbdd8506540e7949fa110c26131dca028671be06
Signed-off-by: Wei-Ning Huang <wnhuang@google.com>
Reviewed-on: https://chromium-review.googlesource.com/573981
Commit-Ready: Wei-Ning Huang <wnhuang@chromium.org>
Tested-by: Wei-Ning Huang <wnhuang@chromium.org>
Reviewed-by: Rong Chang <rongchang@chromium.org>
-rw-r--r-- | chip/stm32/gpio.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/chip/stm32/gpio.c b/chip/stm32/gpio.c index 69f3cadb4e..a89f046a01 100644 --- a/chip/stm32/gpio.c +++ b/chip/stm32/gpio.c @@ -98,6 +98,19 @@ int gpio_enable_interrupt(enum gpio_signal signal) return EC_SUCCESS; } +int gpio_disable_interrupt(enum gpio_signal signal) +{ + const struct gpio_info *g = gpio_list + signal; + + /* Fail if not implemented or no interrupt handler */ + if (!g->mask || signal >= GPIO_IH_COUNT) + return EC_ERROR_INVAL; + + STM32_EXTI_IMR &= ~g->mask; + + return EC_SUCCESS; +} + int gpio_clear_pending_interrupt(enum gpio_signal signal) { const struct gpio_info *g = gpio_list + signal; |