Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c609c05d authored by David Jander's avatar David Jander Committed by Grant Likely
Browse files

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: default avatarDavid Jander <david@protonic.nl>
Signed-off-by: default avatarGrant Likely <grant.likely@secretlab.ca>
parent 8e46ea3e
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -517,9 +517,11 @@ static int pca953x_irq_setup(struct pca953x_chip *chip,

static void pca953x_irq_teardown(struct pca953x_chip *chip)
{
	if (chip->irq_base != -1)
	if (chip->irq_base != -1) {
		irq_free_descs(chip->irq_base, chip->gpio_chip.ngpio);
		free_irq(chip->client->irq, chip);
	}
}
#else /* CONFIG_GPIO_PCA953X_IRQ */
static int pca953x_irq_setup(struct pca953x_chip *chip,
			     const struct i2c_device_id *id)