From 5ede804e2da7bebda73af1eb3b5e1bbbcd48a722 Mon Sep 17 00:00:00 2001 From: Emil Dahl Juhl Date: Thu, 22 Aug 2024 13:27:34 +0200 Subject: [PATCH] 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 --- drivers/gpio/gpio_mspm0.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpio/gpio_mspm0.c b/drivers/gpio/gpio_mspm0.c index 1dd41faa4b1..38eab8b806c 100644 --- a/drivers/gpio/gpio_mspm0.c +++ b/drivers/gpio/gpio_mspm0.c @@ -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) {