mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2026-01-10 17:41:54 +00:00
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>
This commit is contained in:
committed by
chrome-internal-fetch
parent
cf62055270
commit
aa57f29aa4
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user