diff options
author | Neo Hou <neo.hou@unisoc.com> | 2019-01-16 06:06:14 +0100 |
---|---|---|
committer | Bartosz Golaszewski <bgolaszewski@baylibre.com> | 2019-01-23 17:24:01 +0100 |
commit | f785ffb61605734b518afa766d1b5445e9f38c8d (patch) | |
tree | 0caadc7312af7355dbcf397e37bd1c70bf1ec72f /drivers/gpio/gpio-eic-sprd.c | |
parent | gpio: sprd: Fix the incorrect data register (diff) | |
download | linux-f785ffb61605734b518afa766d1b5445e9f38c8d.tar.xz linux-f785ffb61605734b518afa766d1b5445e9f38c8d.zip |
gpio: sprd: Fix incorrect irq type setting for the async EIC
When setting async EIC as IRQ_TYPE_EDGE_BOTH type, we missed to set the
SPRD_EIC_ASYNC_INTMODE register to 0, which means detecting edge signals.
Thus this patch fixes the issue.
Fixes: 25518e024e3a ("gpio: Add Spreadtrum EIC driver support")
Cc: <stable@vger.kernel.org>
Signed-off-by: Neo Hou <neo.hou@unisoc.com>
Signed-off-by: Baolin Wang <baolin.wang@linaro.org>
Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
Diffstat (limited to 'drivers/gpio/gpio-eic-sprd.c')
-rw-r--r-- | drivers/gpio/gpio-eic-sprd.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/gpio/gpio-eic-sprd.c b/drivers/gpio/gpio-eic-sprd.c index 257df59815c9..e41223c05f6e 100644 --- a/drivers/gpio/gpio-eic-sprd.c +++ b/drivers/gpio/gpio-eic-sprd.c @@ -379,6 +379,7 @@ static int sprd_eic_irq_set_type(struct irq_data *data, unsigned int flow_type) irq_set_handler_locked(data, handle_edge_irq); break; case IRQ_TYPE_EDGE_BOTH: + sprd_eic_update(chip, offset, SPRD_EIC_ASYNC_INTMODE, 0); sprd_eic_update(chip, offset, SPRD_EIC_ASYNC_INTBOTH, 1); irq_set_handler_locked(data, handle_edge_irq); break; |