From fb098b07fc2613ce2cfc2b113b5d2af2a900ef2d Mon Sep 17 00:00:00 2001 From: Sherry Sun Date: Fri, 9 Sep 2022 18:32:41 +0800 Subject: [PATCH] mxm_wifiex: fix oob irq request fail on i.MX93 9x9 qsb board i.MX93 9x9 qsb board connect the out-of-band WoWLAN irq pin(M.2 pin21 SDIO_WAKE) to I2C IO expander pcal6524 instead of i.MX GPIO, pcal6524 IRQ handlers need to be threaded, and the IRQ trigger type depends on the devicetree setting. Also the IRQF_ONESHOT flag need to be set for threaded IRQ. Signed-off-by: Sherry Sun Reviewed-by: Haibo Chen --- mxm_wifiex/wlan_src/mlinux/moal_main.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/mxm_wifiex/wlan_src/mlinux/moal_main.c b/mxm_wifiex/wlan_src/mlinux/moal_main.c index 709392c..0e1ee59 100644 --- a/mxm_wifiex/wlan_src/mlinux/moal_main.c +++ b/mxm_wifiex/wlan_src/mlinux/moal_main.c @@ -10041,9 +10041,15 @@ void woal_regist_oob_wakeup_irq(moal_handle *handle) goto err_exit; } - ret = devm_request_irq(dev, handle->irq_oob_wakeup, - woal_oob_wakeup_irq_handler, - IRQF_TRIGGER_LOW | IRQF_SHARED, + /* + * i.MX93 9x9 qsb board connect the out-of-band WoWLAN irq pin(M.2 pin21 + * SDIO_WAKE) to I2C IO expander pcal6524 instead of i.MX GPIO, pcal6524 + * IRQ handlers need to be threaded, the IRQ trigger type depends on the + * Devicetree setting. + */ + ret = devm_request_threaded_irq(dev, handle->irq_oob_wakeup, + NULL, woal_oob_wakeup_irq_handler, + IRQF_SHARED | IRQF_ONESHOT, "wifi_oob_wakeup", handle); if (ret) { dev_err(dev, "Failed to request irq_oob_wakeup %d (%d)\n",