Skip to content

Commit

Permalink
drivers: gpio_cc32xx: avoid unnecessarily disabling interrupts in isr
Browse files Browse the repository at this point in the history
In the gpio isr, gpio interrupts are disabled when invoking the
registered callbacks. This is unnecessary, and causes a problem if the
callback attempts to disable gpio interrupts by reconfiguring the pin
as in the test gpio_basic_api.

Fixes zephyrproject-rtos#22847

Signed-off-by: Vincent Wan <vincent.wan@linaro.org>
  • Loading branch information
vanti committed Feb 15, 2020
1 parent 1736cb7 commit c1bb4b9
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions drivers/gpio/gpio_cc32xx.c
Original file line number Diff line number Diff line change
Expand Up @@ -246,16 +246,12 @@ static void gpio_cc32xx_port_isr(void *arg)

enabled_int = int_status & data->pin_callback_enables;

/* Clear and Disable GPIO Interrupt */
MAP_GPIOIntDisable(config->port_base, int_status);
/* Clear GPIO Interrupt */
MAP_GPIOIntClear(config->port_base, int_status);

/* Call the registered callbacks */
gpio_fire_callbacks(&data->callbacks, (struct device *)dev,
enabled_int);

/* Re-enable the interrupts */
MAP_GPIOIntEnable(config->port_base, int_status);
}

static const struct gpio_driver_api api_funcs = {
Expand Down

0 comments on commit c1bb4b9

Please sign in to comment.