summaryrefslogtreecommitdiff
path: root/drivers/gpio/gpio-rockchip.c
diff options
context:
space:
mode:
authorJeffy Chen <jeffy.chen@rock-chips.com>2022-08-24 09:06:05 +0800
committerBartosz Golaszewski <brgl@bgdev.pl>2022-08-31 14:37:34 +0200
commitb98dbd82ee319d74103510f953a1ca2cd9202614 (patch)
tree9c9aec1531b6b936b79b2f2a5a7559585d4768b8 /drivers/gpio/gpio-rockchip.c
parent66df18b3bd74107dd7c196e75ce00d64d7553152 (diff)
downloadlwn-b98dbd82ee319d74103510f953a1ca2cd9202614.tar.gz
lwn-b98dbd82ee319d74103510f953a1ca2cd9202614.zip
gpio/rockchip: Convert to generic_handle_domain_irq()
Follow commit dbd1c54fc820 ("gpio: Bulk conversion to generic_handle_domain_irq()"). Signed-off-by: Jeffy Chen <jeffy.chen@rock-chips.com> Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Bartosz Golaszewski <brgl@bgdev.pl>
Diffstat (limited to 'drivers/gpio/gpio-rockchip.c')
-rw-r--r--drivers/gpio/gpio-rockchip.c21
1 files changed, 5 insertions, 16 deletions
diff --git a/drivers/gpio/gpio-rockchip.c b/drivers/gpio/gpio-rockchip.c
index f91e876fd969..ebb50c25a461 100644
--- a/drivers/gpio/gpio-rockchip.c
+++ b/drivers/gpio/gpio-rockchip.c
@@ -325,26 +325,15 @@ static void rockchip_irq_demux(struct irq_desc *desc)
{
struct irq_chip *chip = irq_desc_get_chip(desc);
struct rockchip_pin_bank *bank = irq_desc_get_handler_data(desc);
- u32 pend;
+ unsigned long pending;
+ unsigned int irq;
dev_dbg(bank->dev, "got irq for bank %s\n", bank->name);
chained_irq_enter(chip, desc);
- pend = readl_relaxed(bank->reg_base + bank->gpio_regs->int_status);
-
- while (pend) {
- unsigned int irq, virq;
-
- irq = __ffs(pend);
- pend &= ~BIT(irq);
- virq = irq_find_mapping(bank->domain, irq);
-
- if (!virq) {
- dev_err(bank->dev, "unmapped irq %d\n", irq);
- continue;
- }
-
+ pending = readl_relaxed(bank->reg_base + bank->gpio_regs->int_status);
+ for_each_set_bit(irq, &pending, 32) {
dev_dbg(bank->dev, "handling irq %d\n", irq);
/*
@@ -378,7 +367,7 @@ static void rockchip_irq_demux(struct irq_desc *desc)
} while ((data & BIT(irq)) != (data_old & BIT(irq)));
}
- generic_handle_irq(virq);
+ generic_handle_domain_irq(bank->domain, irq);
}
chained_irq_exit(chip, desc);