* [PATCH v2] Bluetooth: btnxpuart: Uses threaded IRQ for host wakeup handling
@ 2025-08-04 10:30 Neeraj Sanjay Kale
2025-08-04 11:10 ` [v2] " bluez.test.bot
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Neeraj Sanjay Kale @ 2025-08-04 10:30 UTC (permalink / raw)
To: marcel, luiz.dentz
Cc: linux-bluetooth, linux-kernel, amitkumar.karwar, sherry.sun,
neeraj.sanjaykale
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 <neeraj.sanjaykale@nxp.com>
---
v2: Add reason for removing IRQF_TRIGGER_FALLING in commit message.
(Sherry Sun)
---
drivers/bluetooth/btnxpuart.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/bluetooth/btnxpuart.c b/drivers/bluetooth/btnxpuart.c
index 73a4a325c867..76e7f857fb7d 100644
--- a/drivers/bluetooth/btnxpuart.c
+++ b/drivers/bluetooth/btnxpuart.c
@@ -543,10 +543,10 @@ static int ps_setup(struct hci_dev *hdev)
}
if (psdata->wakeup_source) {
- ret = devm_request_irq(&serdev->dev, psdata->irq_handler,
- ps_host_wakeup_irq_handler,
- IRQF_ONESHOT | IRQF_TRIGGER_FALLING,
- dev_name(&serdev->dev), nxpdev);
+ ret = devm_request_threaded_irq(&serdev->dev, psdata->irq_handler,
+ NULL, ps_host_wakeup_irq_handler,
+ IRQF_ONESHOT,
+ dev_name(&serdev->dev), nxpdev);
if (ret)
bt_dev_info(hdev, "error setting wakeup IRQ handler, ignoring\n");
disable_irq(psdata->irq_handler);
--
2.34.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* RE: [v2] Bluetooth: btnxpuart: Uses threaded IRQ for host wakeup handling
2025-08-04 10:30 [PATCH v2] Bluetooth: btnxpuart: Uses threaded IRQ for host wakeup handling Neeraj Sanjay Kale
@ 2025-08-04 11:10 ` bluez.test.bot
2025-08-06 7:02 ` [PATCH v2] " Sherry Sun
2025-08-11 16:40 ` patchwork-bot+bluetooth
2 siblings, 0 replies; 4+ messages in thread
From: bluez.test.bot @ 2025-08-04 11:10 UTC (permalink / raw)
To: linux-bluetooth, neeraj.sanjaykale
[-- Attachment #1: Type: text/plain, Size: 2028 bytes --]
This is automated email and please do not reply to this email!
Dear submitter,
Thank you for submitting the patches to the linux bluetooth mailing list.
This is a CI test results with your patch series:
PW Link:https://patchwork.kernel.org/project/bluetooth/list/?series=988084
---Test result---
Test Summary:
CheckPatch PENDING 0.26 seconds
GitLint PENDING 0.21 seconds
SubjectPrefix PASS 0.13 seconds
BuildKernel PASS 23.92 seconds
CheckAllWarning PASS 26.78 seconds
CheckSparse PASS 30.25 seconds
BuildKernel32 PASS 24.39 seconds
TestRunnerSetup PASS 477.80 seconds
TestRunner_l2cap-tester PASS 26.75 seconds
TestRunner_iso-tester PASS 38.03 seconds
TestRunner_bnep-tester PASS 6.05 seconds
TestRunner_mgmt-tester PASS 129.49 seconds
TestRunner_rfcomm-tester PASS 9.30 seconds
TestRunner_sco-tester PASS 14.63 seconds
TestRunner_ioctl-tester PASS 10.01 seconds
TestRunner_mesh-tester FAIL 11.40 seconds
TestRunner_smp-tester PASS 8.71 seconds
TestRunner_userchan-tester PASS 6.21 seconds
IncrementalBuild PENDING 0.48 seconds
Details
##############################
Test: CheckPatch - PENDING
Desc: Run checkpatch.pl script
Output:
##############################
Test: GitLint - PENDING
Desc: Run gitlint
Output:
##############################
Test: TestRunner_mesh-tester - FAIL
Desc: Run mesh-tester with test-runner
Output:
Total: 10, Passed: 8 (80.0%), Failed: 2, Not Run: 0
Failed Test Cases
Mesh - Send cancel - 1 Timed out 2.197 seconds
Mesh - Send cancel - 2 Timed out 1.997 seconds
##############################
Test: IncrementalBuild - PENDING
Desc: Incremental build with the patches in the series
Output:
---
Regards,
Linux Bluetooth
^ permalink raw reply [flat|nested] 4+ messages in thread
* RE: [PATCH v2] Bluetooth: btnxpuart: Uses threaded IRQ for host wakeup handling
2025-08-04 10:30 [PATCH v2] Bluetooth: btnxpuart: Uses threaded IRQ for host wakeup handling Neeraj Sanjay Kale
2025-08-04 11:10 ` [v2] " bluez.test.bot
@ 2025-08-06 7:02 ` Sherry Sun
2025-08-11 16:40 ` patchwork-bot+bluetooth
2 siblings, 0 replies; 4+ messages in thread
From: Sherry Sun @ 2025-08-06 7:02 UTC (permalink / raw)
To: Neeraj Sanjay Kale, marcel@holtmann.org, luiz.dentz@gmail.com
Cc: linux-bluetooth@vger.kernel.org, linux-kernel@vger.kernel.org,
Amitkumar Karwar
> -----Original Message-----
> From: Neeraj Sanjay Kale <neeraj.sanjaykale@nxp.com>
> Sent: Monday, August 4, 2025 6:30 PM
> To: marcel@holtmann.org; luiz.dentz@gmail.com
> Cc: linux-bluetooth@vger.kernel.org; linux-kernel@vger.kernel.org;
> Amitkumar Karwar <amitkumar.karwar@nxp.com>; Sherry Sun
> <sherry.sun@nxp.com>; Neeraj Sanjay Kale <neeraj.sanjaykale@nxp.com>
> Subject: [PATCH v2] 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 <neeraj.sanjaykale@nxp.com>
Reviewed-by: Sherry Sun <sherry.sun@nxp.com>
Best Regards
Sherry
> ---
> v2: Add reason for removing IRQF_TRIGGER_FALLING in commit message.
> (Sherry Sun)
> ---
> drivers/bluetooth/btnxpuart.c | 8 ++++----
> 1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/bluetooth/btnxpuart.c b/drivers/bluetooth/btnxpuart.c
> index 73a4a325c867..76e7f857fb7d 100644
> --- a/drivers/bluetooth/btnxpuart.c
> +++ b/drivers/bluetooth/btnxpuart.c
> @@ -543,10 +543,10 @@ static int ps_setup(struct hci_dev *hdev)
> }
>
> if (psdata->wakeup_source) {
> - ret = devm_request_irq(&serdev->dev, psdata->irq_handler,
> - ps_host_wakeup_irq_handler,
> - IRQF_ONESHOT |
> IRQF_TRIGGER_FALLING,
> - dev_name(&serdev->dev), nxpdev);
> + ret = devm_request_threaded_irq(&serdev->dev, psdata-
> >irq_handler,
> + NULL,
> ps_host_wakeup_irq_handler,
> + IRQF_ONESHOT,
> + dev_name(&serdev->dev),
> nxpdev);
> if (ret)
> bt_dev_info(hdev, "error setting wakeup IRQ handler,
> ignoring\n");
> disable_irq(psdata->irq_handler);
> --
> 2.34.1
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v2] Bluetooth: btnxpuart: Uses threaded IRQ for host wakeup handling
2025-08-04 10:30 [PATCH v2] Bluetooth: btnxpuart: Uses threaded IRQ for host wakeup handling Neeraj Sanjay Kale
2025-08-04 11:10 ` [v2] " bluez.test.bot
2025-08-06 7:02 ` [PATCH v2] " Sherry Sun
@ 2025-08-11 16:40 ` patchwork-bot+bluetooth
2 siblings, 0 replies; 4+ messages in thread
From: patchwork-bot+bluetooth @ 2025-08-11 16:40 UTC (permalink / raw)
To: Neeraj Sanjay Kale
Cc: marcel, luiz.dentz, linux-bluetooth, linux-kernel,
amitkumar.karwar, sherry.sun
Hello:
This patch was applied to bluetooth/bluetooth-next.git (master)
by Luiz Augusto von Dentz <luiz.von.dentz@intel.com>:
On Mon, 4 Aug 2025 16:00:15 +0530 you wrote:
> 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.
>
> [...]
Here is the summary with links:
- [v2] Bluetooth: btnxpuart: Uses threaded IRQ for host wakeup handling
https://git.kernel.org/bluetooth/bluetooth-next/c/3f9a516852b6
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2025-08-11 16:39 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-08-04 10:30 [PATCH v2] Bluetooth: btnxpuart: Uses threaded IRQ for host wakeup handling Neeraj Sanjay Kale
2025-08-04 11:10 ` [v2] " bluez.test.bot
2025-08-06 7:02 ` [PATCH v2] " Sherry Sun
2025-08-11 16:40 ` patchwork-bot+bluetooth
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.