diff options
author | Bruce Chen <bruce.chen@unisoc.com> | 2019-09-16 17:56:56 +0800 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2019-10-17 13:45:10 -0700 |
commit | d58d477c5852f50fb11c6abb5c041dba1a4580be (patch) | |
tree | df14baf74fd6b1d329f111d75f44355f8aa1782e /drivers/gpio | |
parent | ce20fd3e1530b4158008cef147576e1e6ec5175e (diff) | |
download | linux-stable-d58d477c5852f50fb11c6abb5c041dba1a4580be.tar.gz linux-stable-d58d477c5852f50fb11c6abb5c041dba1a4580be.tar.bz2 linux-stable-d58d477c5852f50fb11c6abb5c041dba1a4580be.zip |
gpio: eic: sprd: Fix the incorrect EIC offset when toggling
commit e91aafcb51f3c5001ae76c3ee027beb0b8506447 upstream.
When toggling the level trigger to emulate the edge trigger, the
EIC offset is incorrect without adding the corresponding bank index,
thus fix it.
Fixes: 7bf0d7f62282 ("gpio: eic: Add edge trigger emulation for EIC")
Cc: stable@vger.kernel.org
Signed-off-by: Bruce Chen <bruce.chen@unisoc.com>
Signed-off-by: Baolin Wang <baolin.wang@linaro.org>
Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/gpio')
-rw-r--r-- | drivers/gpio/gpio-eic-sprd.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/gpio/gpio-eic-sprd.c b/drivers/gpio/gpio-eic-sprd.c index 6cf2e2ce4093..4935cda5301e 100644 --- a/drivers/gpio/gpio-eic-sprd.c +++ b/drivers/gpio/gpio-eic-sprd.c @@ -529,11 +529,12 @@ static void sprd_eic_handle_one_type(struct gpio_chip *chip) } for_each_set_bit(n, ®, SPRD_EIC_PER_BANK_NR) { - girq = irq_find_mapping(chip->irq.domain, - bank * SPRD_EIC_PER_BANK_NR + n); + u32 offset = bank * SPRD_EIC_PER_BANK_NR + n; + + girq = irq_find_mapping(chip->irq.domain, offset); generic_handle_irq(girq); - sprd_eic_toggle_trigger(chip, girq, n); + sprd_eic_toggle_trigger(chip, girq, offset); } } } |