Commit 3e5b9728 authored by Emil Dahl Juhl's avatar Emil Dahl Juhl Committed by Alberto Escolar
Browse files

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: default avatarEmil Dahl Juhl <emdj@bang-olufsen.dk>
parent e88a1475
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -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) {