Skip to contentSkip to conversation

gpio: pca953x: Don't hardcode irq trigger type

PATCH In review Vignesh Raghavendra 2 participants 2 messages Dec 9, 2019 – Dec 11, 2019 GPIO

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 gpio: pca953x: Don't hardcode irq trigger type

Don't hardcode irq trigger to IRQF_TRIGGER_LOW while registering IRQ handler. IRQ/platform core will take care of setting appropriate trigger type.

---
v2:
Drop explicit call to irq_get_trigger_type() as this is take care of in core code.

 drivers/gpio/gpio-pca953x.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/gpio/gpio-pca953x.c +1 -2
index 6652bee01966..40e48f7d83bb 100644
@@ -770,8 +770,7 @@ static int pca953x_irq_setup(struct pca953x_chip *chip, int irq_base)
 
 	ret = devm_request_threaded_irq(&client->dev, client->irq,
 					NULL, pca953x_irq_handler,
-					IRQF_TRIGGER_LOW | IRQF_ONESHOT |
-					IRQF_SHARED,
+					IRQF_ONESHOT | IRQF_SHARED,
 					dev_name(&client->dev), chip);
 	if (ret) {
 		dev_err(&client->dev, "failed to request irq %d\n",
Signature · 1 line
2.24.0
#1 lore raw

pon., 9 gru 2019 o 07:27 Vignesh Raghavendra <[email protected]> napisał(a):

Quoted 29 lines

Don't hardcode irq trigger to IRQF_TRIGGER_LOW while registering IRQ handler. IRQ/platform core will take care of setting appropriate trigger type.

---
v2:
Drop explicit call to irq_get_trigger_type() as this is take care of in core code.

 drivers/gpio/gpio-pca953x.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/gpio/gpio-pca953x.c +1 -3
index 6652bee01966..40e48f7d83bb 100644
@@ -770,8 +770,7 @@ static int pca953x_irq_setup(struct pca953x_chip *chip, int irq_base)
 
        ret = devm_request_threaded_irq(&client->dev, client->irq,
                                        NULL, pca953x_irq_handler,
-                                       IRQF_TRIGGER_LOW | IRQF_ONESHOT |
-                                       IRQF_SHARED,
+                                       IRQF_ONESHOT | IRQF_SHARED,
                                        dev_name(&client->dev), chip);
        if (ret) {
                dev_err(&client->dev, "failed to request irq %d\n",
--
Quoted 2 lines

2.24.0

Patch applied, thanks!

Bartosz