Commit c609c05db10dcb020f6869186e548a0596a78896
Committed by
Grant Likely
1 parent
8e46ea3ec8
Exists in
master
and in
6 other branches
gpio/pca953x: Fix IRQ support.
It seems that in the normal case, IRQ_NOREQUEST needs to be explicitly cleared, otherwise claiming the interrupt fails. In the case of sparse interrupts, the descriptor needs to be allocated first. Signed-off-by: David Jander <david@protonic.nl> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Showing 1 changed file with 3 additions and 1 deletions Side-by-side Diff
drivers/gpio/gpio-pca953x.c
... | ... | @@ -517,8 +517,10 @@ |
517 | 517 | |
518 | 518 | static void pca953x_irq_teardown(struct pca953x_chip *chip) |
519 | 519 | { |
520 | - if (chip->irq_base != -1) | |
520 | + if (chip->irq_base != -1) { | |
521 | + irq_free_descs(chip->irq_base, chip->gpio_chip.ngpio); | |
521 | 522 | free_irq(chip->client->irq, chip); |
523 | + } | |
522 | 524 | } |
523 | 525 | #else /* CONFIG_GPIO_PCA953X_IRQ */ |
524 | 526 | static int pca953x_irq_setup(struct pca953x_chip *chip, |