Skip to content

Commit

Permalink
gpio: realtek-otto: fix GPIO line IRQ offset
Browse files Browse the repository at this point in the history
The irqchip uses one domain for all GPIO lines, so the line offset
should be determined w.r.t. the first line of the first port, not the
first line of the triggered port.

Fixes: 0d82fb1 ("gpio: Add Realtek Otto GPIO support")
Signed-off-by: Sander Vanheule <[email protected]>
Signed-off-by: Bartosz Golaszewski <[email protected]>
  • Loading branch information
svanheule authored and brgl committed Oct 30, 2021
1 parent dd1695a commit 585a070
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/gpio/gpio-realtek-otto.c
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ static void realtek_gpio_irq_handler(struct irq_desc *desc)
status = realtek_gpio_read_isr(ctrl, lines_done / 8);
port_pin_count = min(gc->ngpio - lines_done, 8U);
for_each_set_bit(offset, &status, port_pin_count)
generic_handle_domain_irq(gc->irq.domain, offset);
generic_handle_domain_irq(gc->irq.domain, offset + lines_done);
}

chained_irq_exit(irq_chip, desc);
Expand Down

0 comments on commit 585a070

Please sign in to comment.