input: gpio_kbd_matrix: use edge-to-active interrupt

Change the interrupt setup from both edge to edge to active. Edge to
active is all was needed anyway and it makes this compatible with gpio
controller that only support single edge interrupt.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
This commit is contained in:
Fabio Baltieri 2023-12-15 16:18:31 +00:00 committed by Carles Cufí
parent b6d8d2715c
commit ffbd0397dd

View file

@ -132,7 +132,6 @@ static void gpio_kbd_matrix_set_detect_mode(const struct device *dev, bool enabl
{
const struct gpio_kbd_matrix_config *cfg = dev->config;
const struct input_kbd_matrix_common_config *common = &cfg->common;
gpio_flags_t flags = enabled ? GPIO_INT_EDGE_BOTH : GPIO_INT_DISABLE;
int ret;
if (cfg->idle_poll_dwork != NULL) {
@ -149,6 +148,7 @@ static void gpio_kbd_matrix_set_detect_mode(const struct device *dev, bool enabl
for (int i = 0; i < common->row_size; i++) {
const struct gpio_dt_spec *gpio = &cfg->row_gpio[i];
gpio_flags_t flags = enabled ? GPIO_INT_EDGE_TO_ACTIVE : GPIO_INT_DISABLE;
ret = gpio_pin_interrupt_configure_dt(gpio, flags);
if (ret != 0) {