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 <emdj@bang-olufsen.dk>
This commit is contained in:
Emil Dahl Juhl 2024-08-22 13:25:51 +02:00 committed by Alberto Escolar
parent e88a14751a
commit 3e5b9728e9

View File

@ -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) {