From 3e5b9728e9edeaee52ae7fecd440b3b852f00ecb Mon Sep 17 00:00:00 2001 From: Emil Dahl Juhl Date: Thu, 22 Aug 2024 13:25:51 +0200 Subject: [PATCH] drivers: gpio: mspm0: Fix interrupt polarity The polarity mapping was swapped such that GPIO_INT_TRIG_LOW would translate to high, and vice versa, on the chip configuration. Swap the polarity to fix this. 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 be01900f594..1dd41faa4b1 100644 --- a/drivers/gpio/gpio_mspm0.c +++ b/drivers/gpio/gpio_mspm0.c @@ -186,11 +186,11 @@ static int gpio_mspm0_pin_interrupt_configure(const struct device *port, uint32_t polarity = 0x00; if (trig & GPIO_INT_TRIG_LOW) { - polarity |= BIT(0); + polarity |= BIT(1); } if (trig & GPIO_INT_TRIG_HIGH) { - polarity |= BIT(1); + polarity |= BIT(0); } if (pin < MSPM0_PINS_LOW_GROUP) {