drivers: gpio: mspm0: Mask interrupts correctly

Reading back the raw interrupt status from the gpio controller, provides
the interrupt mask _without_ the controller's masking registers applied.
This means that e.g. a rising edge would trigger an interrupt even on
pins that are configured for falling edge only.

Fix this by reading the "enabled" interrupt status instead of the raw
one.

Signed-off-by: Emil Dahl Juhl <emdj@bang-olufsen.dk>
This commit is contained in:
Emil Dahl Juhl 2024-08-22 13:27:34 +02:00 committed by Alberto Escolar
parent 3e5b9728e9
commit 5ede804e2d

View File

@ -246,8 +246,8 @@ static void gpio_mspm0_isr(const struct device *port)
data = dev_list[i]->data;
config = dev_list[i]->config;
status = DL_GPIO_getRawInterruptStatus(config->base,
0xFFFFFFFF);
status = DL_GPIO_getEnabledInterruptStatus(config->base,
0xFFFFFFFF);
DL_GPIO_clearInterruptStatus(config->base, status);
if (status != 0) {