Skip to content

Commit

Permalink
gpio: eic: sprd: Fix incorrect irq type setting for the sync EIC
Browse files Browse the repository at this point in the history
When setting sync EIC as IRQ_TYPE_EDGE_BOTH type, we missed to set the
SPRD_EIC_SYNC_INTMODE register to 0, which means detecting edge signals.

Thus this patch fixes the issue.

Fixes: 25518e0 ("gpio: Add Spreadtrum EIC driver support")
Cc: <[email protected]>
Signed-off-by: Baolin Wang <[email protected]>
Signed-off-by: Linus Walleij <[email protected]>
  • Loading branch information
wangbaolin719 authored and linusw committed Apr 11, 2019
1 parent 79a3aaa commit 102bbe3
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/gpio/gpio-eic-sprd.c
Original file line number Diff line number Diff line change
Expand Up @@ -414,6 +414,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_SYNC_INTMODE, 0);
sprd_eic_update(chip, offset, SPRD_EIC_SYNC_INTBOTH, 1);
irq_set_handler_locked(data, handle_edge_irq);
break;
Expand Down

0 comments on commit 102bbe3

Please sign in to comment.