summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSander Vanheule <sander@svanheule.net>2021-10-28 10:52:43 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2021-11-17 11:04:37 +0100
commit3612fdf488d5130e716aaab87b2cfdd0d2d4f89a (patch)
treec8b77c275b985ac43871aa257656064a934a9a77
parentc64b55c85fb2aaa0da1c42b667cadd47be9fda90 (diff)
gpio: realtek-otto: fix GPIO line IRQ offset
[ Upstream commit 585a07079909ba9061ddd88214c36653e1aef71a ] 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: 0d82fb1127fb ("gpio: Add Realtek Otto GPIO support") Signed-off-by: Sander Vanheule <sander@svanheule.net> Signed-off-by: Bartosz Golaszewski <brgl@bgdev.pl> Signed-off-by: Sasha Levin <sashal@kernel.org>
-rw-r--r--drivers/gpio/gpio-realtek-otto.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpio/gpio-realtek-otto.c b/drivers/gpio/gpio-realtek-otto.c
index cb64fb5a51aa..e0cbaa1ea22e 100644
--- a/drivers/gpio/gpio-realtek-otto.c
+++ b/drivers/gpio/gpio-realtek-otto.c
@@ -206,7 +206,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) {
- irq = irq_find_mapping(gc->irq.domain, offset);
+ irq = irq_find_mapping(gc->irq.domain, offset + lines_done);
generic_handle_irq(irq);
}
}