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:
parent
b6d8d2715c
commit
ffbd0397dd
|
@ -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 gpio_kbd_matrix_config *cfg = dev->config;
|
||||||
const struct input_kbd_matrix_common_config *common = &cfg->common;
|
const struct input_kbd_matrix_common_config *common = &cfg->common;
|
||||||
gpio_flags_t flags = enabled ? GPIO_INT_EDGE_BOTH : GPIO_INT_DISABLE;
|
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
if (cfg->idle_poll_dwork != NULL) {
|
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++) {
|
for (int i = 0; i < common->row_size; i++) {
|
||||||
const struct gpio_dt_spec *gpio = &cfg->row_gpio[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);
|
ret = gpio_pin_interrupt_configure_dt(gpio, flags);
|
||||||
if (ret != 0) {
|
if (ret != 0) {
|
||||||
|
|
Loading…
Reference in a new issue