summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexandru M Stan <amstan@chromium.org>2014-09-16 14:14:16 -0700
committerchrome-internal-fetch <chrome-internal-fetch@google.com>2014-09-24 06:25:39 +0000
commitaa57f29aa4e458150754e4629999c0b403f57dad (patch)
tree67f48dc2513a719bdc92aac28c3e255033e7e64e
parentcf62055270fa35fb613db3a850c81e6a9bc01af0 (diff)
downloadchrome-ec-aa57f29aa4e458150754e4629999c0b403f57dad.tar.gz
stm32/gpio: Supress overriding interrupt warning in some cases
The warning should only warn if there's an actual danger(in order to give a clue to developers that something might be amiss). Messages like "Overriding SPI1_NSS with SPI1_NSS on EXTI4" are just spammy. This patch makes it so it only warns if the interrupt is different. BUG=chrome-os-partner:31390 TEST=spam gpio_enable_interrupt(GPIO_SPI1_NSS); in a bunch of places (like spi_event), it should not complain about the interrupt being set to the same thing before. Whereas before it was so spammy it did not even have time to reply to SPI. BRANCH=None Change-Id: I786a821eb8167e3568d0be371c4de26bb124431a Signed-off-by: Alexandru M Stan <amstan@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/218563 Reviewed-by: Randall Spangler <rspangler@chromium.org>
-rw-r--r--chip/stm32/gpio.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/chip/stm32/gpio.c b/chip/stm32/gpio.c
index df65aba533..37dc7adbbb 100644
--- a/chip/stm32/gpio.c
+++ b/chip/stm32/gpio.c
@@ -79,7 +79,7 @@ int gpio_enable_interrupt(enum gpio_signal signal)
bit = 31 - __builtin_clz(g->mask);
- if (exti_events[bit]) {
+ if ((exti_events[bit]) && (exti_events[bit] != g)) {
CPRINTS("Overriding %s with %s on EXTI%d",
exti_events[bit]->name, g->name, bit);
}