drivers/gpio: stm32: exti: Clear triggers when not requested

Since it is now possible to disable/re-enable interrupts and
also to reconfigure an already configured interrupt, it is
now required to clear non requested triggers.
While it is not strictly requested, triggers are also cleared
when interrupt is disabled (assuming trigger should be configured
when interrupt is enabled).

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>

fixup exti
This commit is contained in:
Erwan Gouriou 2019-10-08 16:39:01 +02:00 committed by Carles Cufí
commit e88cdffcd6
3 changed files with 26 additions and 16 deletions

View file

@ -44,10 +44,14 @@ void stm32_exti_disable(int line);
* @brief EXTI trigger flags
*/
enum stm32_exti_trigger {
/* clear trigger */
STM32_EXTI_TRIG_NONE = 0x0,
/* trigger on rising edge */
STM32_EXTI_TRIG_RISING = 0x1,
/* trigger on falling endge */
STM32_EXTI_TRIG_FALLING = 0x2,
/* trigger on falling endge */
STM32_EXTI_TRIG_BOTH = 0x3,
};
/**