Skip to content

Commit e489317

Browse files
NeerajSanjayKaleVudentz
authored andcommitted
Bluetooth: btnxpuart: Uses threaded IRQ for host wakeup handling
This replaces devm_request_irq() with devm_request_threaded_irq(). On iMX93 11x11 EVK platform, the BT chip's BT_WAKE_OUT pin is connected to an I2C GPIO expander instead of directly been connected to iMX GPIO. When I2C GPIO expander's (PCAL6524) host driver receives an interrupt on it's INTR line, the driver's interrupt handler needs to query the interrupt source with PCAL6524 first, and then call the actual interrupt handler, in this case the IRQ handler in BTNXPUART. In order to handle interrupts when such I2C GPIO expanders are between the host and interrupt source, devm_request_threaded_irq() is needed. This commit also removes the IRQF_TRIGGER_FALLING flag, to allow setting the IRQ trigger type from the device tree setting instead of hardcoding in the driver. Signed-off-by: Neeraj Sanjay Kale <[email protected]> Reviewed-by: Sherry Sun <[email protected]> Signed-off-by: Luiz Augusto von Dentz <[email protected]>
1 parent 0eaf7c7 commit e489317

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

drivers/bluetooth/btnxpuart.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -543,10 +543,10 @@ static int ps_setup(struct hci_dev *hdev)
543543
}
544544

545545
if (psdata->wakeup_source) {
546-
ret = devm_request_irq(&serdev->dev, psdata->irq_handler,
547-
ps_host_wakeup_irq_handler,
548-
IRQF_ONESHOT | IRQF_TRIGGER_FALLING,
549-
dev_name(&serdev->dev), nxpdev);
546+
ret = devm_request_threaded_irq(&serdev->dev, psdata->irq_handler,
547+
NULL, ps_host_wakeup_irq_handler,
548+
IRQF_ONESHOT,
549+
dev_name(&serdev->dev), nxpdev);
550550
if (ret)
551551
bt_dev_info(hdev, "error setting wakeup IRQ handler, ignoring\n");
552552
disable_irq(psdata->irq_handler);

0 commit comments

Comments
 (0)