> +static void txgbe_toggle_trigger(struct gpio_chip *gc, unsigned int offset) > +{ > + struct wx *wx = gpiochip_get_data(gc); > + u32 pol, val; > + > + pol = rd32(wx, WX_GPIO_POLARITY); > + val = rd32(wx, WX_GPIO_EXT); > + > + if (val & BIT(offset)) > + pol &= ~BIT(offset); > + else > + pol |= BIT(offset); > + > + wr32(wx, WX_GPIO_POLARITY, pol); > +} So you look at the current state of the GPIO and set the polarity to trigger an interrupt when it changes. This is not race free. And if it does race, at best you loose an interrupt. The worst is your hardware locks up because that interrupt was missed and it cannot continue until some action is taken. Is there any other GPIO driver doing this? I think you would be better indicating you don't support IRQ_TYPE_EDGE_BOTH. Andrew