platform/x86: intel: int0002_vgpio: Pass IRQF_ONESHOT to request_irq()
PATCH 1/1 platform/x86: intel: int0002_vgpio: Pass IRQF_ONESHOT to request_irq()
Since commit 7a36b901a6eb ("ACPI: OSL: Use a threaded interrupt handler for SCI") the ACPI OSL code passes IRQF_ONESHOT when requesting the SCI.
Since the INT0002 GPIO is typically shared with the ACPI SCI the INT0002 driver must pass the same flags.
This fixes the INT0002 driver failing to probe due to following error + as well as removing the backtrace that follows this error:
"genirq: Flags mismatch irq 9. 00000084 (INT0002) vs. 00002080 (acpi)"
--- drivers/platform/x86/intel/int0002_vgpio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/platform/x86/intel/int0002_vgpio.c +1 -1
@@ -196,7 +196,7 @@ static int int0002_probe(struct platform_device *pdev)* IRQs into gpiolib. */ ret =devm_request_irq (dev, irq, int0002_irq, -IRQF_SHARED ,"INT0002" , chip); +IRQF_ONESHOT |IRQF_SHARED ,"INT0002" , chip);if (ret) {dev_err (dev,"Error requesting IRQ %d: %d\n" , irq, ret);return ret;
Signature · 1 line
2.43.0
Quoted 11 lines · Hans de Goede
Since commit
7a36b901a6eb("ACPI: OSL: Use a threaded interrupt handler for SCI") the ACPI OSL code passesIRQF_ONESHOTwhen requesting the SCI.Since the INT0002 GPIO is typically shared with the ACPI SCI the INT0002 driver must pass the same flags.
This fixes the INT0002 driver failing to probe due to following error + as well as removing the backtrace that follows this error:
"genirq: Flags mismatch irq 9. 00000084 (INT0002) vs. 00002080 (acpi)"
While this seems the correct fix, I'm wondering why this driver can't instead subscribe to a GPE event. See how gpio-sch does this.
Signature · 2 lines
With Best Regards, Andy Shevchenko
Hi,
Quoted 8 lines · Andy Shevchenko
Quoted 7 lines · Hans de Goede
Since commit
7a36b901a6eb("ACPI: OSL: Use a threaded interrupt handler for SCI") the ACPI OSL code passesIRQF_ONESHOTwhen requesting the SCI.Since the INT0002 GPIO is typically shared with the ACPI SCI the INT0002 driver must pass the same flags.
Quoted 7 lines
Quoted 4 lines
This fixes the INT0002 driver failing to probe due to following error + as well as removing the backtrace that follows this error:
"genirq: Flags mismatch irq 9. 00000084 (INT0002) vs. 00002080 (acpi)"
While this seems the correct fix, I'm wondering why this driver can't instead subscribe to a GPE event. See how gpio-sch does this.
This is modelled in ACPI as a separate device with its own IRQ, so we are just following how this is modelled in ACPI here.
And IIRC I think not all BYT/CHT devices which use this driver hac a SCI defined in their ACPI tables and without a SCI there are no GPE events.
Regards,
Hans
Hi,
Quoted 6 lines · Hans de Goede
Since commit
7a36b901a6eb("ACPI: OSL: Use a threaded interrupt handler for SCI") the ACPI OSL code passesIRQF_ONESHOTwhen requesting the SCI.Since the INT0002 GPIO is typically shared with the ACPI SCI the INT0002 driver must pass the same flags.
Quoted 7 lines
This fixes the INT0002 driver failing to probe due to following error + as well as removing the backtrace that follows this error:
"genirq: Flags mismatch irq 9. 00000084 (INT0002) vs. 00002080 (acpi)"
Fixes 7a36b901a6eb ("ACPI: OSL: Use a threaded interrupt handler for SCI")Signed-off-by Hans de Goede <[email protected]>
I've added this to my review-hans (soon to be fixes) branch now.
Regards,
Hans
Quoted 17 lines
--- drivers/platform/x86/intel/int0002_vgpio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/platform/x86/intel/int0002_vgpio.c +1
-1@@ -196,7 +196,7 @@ static int int0002_probe(struct platform_device *pdev)* IRQs into gpiolib. */ ret =devm_request_irq (dev, irq, int0002_irq, -IRQF_SHARED ,"INT0002" , chip); +IRQF_ONESHOT |IRQF_SHARED ,"INT0002" , chip);if (ret) {dev_err (dev,"Error requesting IRQ %d: %d\n" , irq, ret);return ret;