Zephyr OS GPIO Interrupt Setup: Configure Pin Polarity Before Using the Devicetree Interrupt Helper
An interrupt configured from a devicetree GPIO specification does not automatically establish every property of that pin. For Zephyr OS applications, a useful review question is whether normal pin configuration succeeded before a logical interrupt trigger was selected. A correctly written active-low property can still be ineffective if the application assumes the interrupt helper performs that earlier setup.
This article examines the Zephyr v4.4.0 GPIO wrapper contract. The proposed investigation concerns configuration order and helper responsibilities, rather than a measured fault on a particular board. Controller capabilities, electrical connections and any driver that already owns the pin still require separate assessment.

Follow the two configuration paths
The tagged GPIO API implementation shows different treatment of a devicetree specification. The pin-configuration helper combines its extra flags with the specification's flags. The interrupt helper carries over only the wakeup flag; it does not copy the specification's polarity into a fresh pin configuration. Logical interrupt conversion consults the GPIO driver's existing inversion mask, which the pin-configuration wrapper updates.
That relationship gives a practical debugging order. Find the code that configures the pin, check its return value, and establish whether anything subsequently reconfigures the same pin. Only then inspect the requested interrupt mode. Reading the overlay alone does not establish the runtime sequence.
The GPIO devicetree flag definitions distinguish active-low polarity from electrical properties such as pulls and single-ended drive. Treat those as different questions in the review: logical meaning, electrical bias and hardware interrupt support should not be collapsed into one flag change.
Identify the missing step before changing the edge
Consider a hypothetical input described as active-low. The application constructs its GPIO specification and immediately requests an interrupt when that input becomes logically active. A reviewer sees the correct overlay and suspects the controller when the observed edge is unexpected.
The first experiment should trace startup calls, not invert the requested edge until the symptom disappears. Locate a successful input configuration using that specification. If the setup is missing, repair the initialization sequence. If it failed, handle the failure before enabling interrupts. If another owner later changes the pin configuration, resolve that ownership conflict rather than adding a second contradictory initialization path.
A physical edge request and a logical activation request also represent different intentions. Select one based on the signal contract. A workaround that changes to a physical falling edge may hide the missing setup on one board while leaving the application dependent on that board's wiring.
Check callback readiness independently
Successful interrupt configuration does not prove that application state is ready to receive an event. Arrange callback registration and its backing storage so that an event cannot reach an incompletely initialized object. Decide how an already-asserted input should be handled at startup; an edge-only design may need a deliberate initial state read rather than assuming a new transition will occur.
For a proposed bench check, capture the physical signal and the application's callback observation together. Exercise both assertion and release after initialization, then repeat after any suspend, resume or reconfiguration path. Keep the expected logical transition explicit. These observations can distinguish a wrong trigger choice from an interrupt that never became enabled or a callback that was not ready.
Keep the fix within the pin's ownership boundary
Do not apply this initialization sequence blindly to pins managed by another device driver. Review that driver's public interface and existing setup first. Likewise, stop on unsupported interrupt configuration instead of treating the overlay as proof that the controller implements the requested mode.
The useful result is a small ownership and ordering correction: the intended pin configuration succeeds, the interrupt request uses the intended logical or physical meaning, and the callback can safely consume the event. That is more portable than compensating for an unexplained edge reversal in application logic.