I am implementing an interrupt handling module using thread irq. I am facing this error:
1983.150961] Shut down eMMC app module init.
[ 1983.151115] genirq: Flags mismatch irq 49. 00000004 (eMMC_power_shutdown_irq_
handler) vs. 00000004 (xuartps)
fio@uz3cg-dgw:~$ (edited)
I am choosing a Flag is #define IRQF_TRIGGER_HIGH 0x00000004 and assign to IRQ number 49 in this case.
Here is my code:
static int __init shutdownemmc_module_init(void)
{
printk("Shut down eMMC app module init. ");
if (request_threaded_irq( IRQ_NO, //IRQ number
(void *) emmc_irq_handler, //IRQ handler (Top half)
emmc_interrupt_thread_fn, //IRQ Thread handler (Bottom half).When the handler function returns IRQ_WAKE_THREAD
IRQF_TRIGGER_HIGH, //Handler will be called in raising edge
"eMMC_power_shutdown_irq_handler", //used to identify the device name using this IRQ
(void *)(emmc_irq_handler))) //device id for shared IRQ
{
pr_err("Cannot register IRQ ");
pr_err(" EIO %d , EINVAL %d\n", EIO, EINVAL);
return 0;
}
pr_info("Interrupt handler...Done!!!\n");
return 0;
}
Could somebody explain what is Flags mismatch irq issue and how I can fix this problem? Thank you, Anh