drivers: gpio: utils: filter pin notifications based on callback
Some drivers masked the set of signaled pins based on enabled interrupts, some did not. For those that did not the 2-pin test could fail. The documentation does not imply that pins unrelated to the callback participate in the notification process, so do the filtering in the generic callback loop. Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
This commit is contained in:
parent
d952861d9f
commit
2f3c43251f
|
@ -59,7 +59,7 @@ static inline void gpio_fire_callbacks(sys_slist_t *list,
|
|||
SYS_SLIST_FOR_EACH_CONTAINER_SAFE(list, cb, tmp, node) {
|
||||
if (cb->pin_mask & pins) {
|
||||
__ASSERT(cb->handler, "No callback handler!");
|
||||
cb->handler(port, cb, pins);
|
||||
cb->handler(port, cb, cb->pin_mask & pins);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue