[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID:
<DB9PR04MB84292FAC859A96ED5010BBB69223A@DB9PR04MB8429.eurprd04.prod.outlook.com>
Date: Mon, 4 Aug 2025 10:08:27 +0000
From: Sherry Sun <sherry.sun@....com>
To: Neeraj Sanjay Kale <neeraj.sanjaykale@....com>, "marcel@...tmann.org"
<marcel@...tmann.org>, "luiz.dentz@...il.com" <luiz.dentz@...il.com>
CC: "linux-bluetooth@...r.kernel.org" <linux-bluetooth@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>, Amitkumar
Karwar <amitkumar.karwar@....com>
Subject: RE: [PATCH v1] Bluetooth: btnxpuart: Uses threaded IRQ for host
wakeup handling
> -----Original Message-----
> From: Neeraj Sanjay Kale <neeraj.sanjaykale@....com>
> Sent: Monday, August 4, 2025 4:57 PM
> To: marcel@...tmann.org; luiz.dentz@...il.com
> Cc: linux-bluetooth@...r.kernel.org; linux-kernel@...r.kernel.org;
> Amitkumar Karwar <amitkumar.karwar@....com>; Sherry Sun
> <sherry.sun@....com>; Neeraj Sanjay Kale <neeraj.sanjaykale@....com>
> Subject: [PATCH v1] 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.
>
> Signed-off-by: Neeraj Sanjay Kale <neeraj.sanjaykale@....com>
> ---
> 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,
Hi Neeraj,
You can also add some comments in your commit message about why remove
the IRQF_TRIGGER_FALLING flag, e.g. let's set the IRQ trigger type depends on
the device tree settings instead of hardcoding in the driver.
Best Regards
Sherry
> - 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
Powered by blists - more mailing lists