* [RFC PATCH v2] Bluetooth: hci_qca: Add device_may_wakeup support
@ 2021-03-11 7:03 Venkata Lakshmi Narayana Gubba
2021-03-11 10:49 ` Marcel Holtmann
2021-05-26 19:03 ` patchwork-bot+linux-arm-msm
0 siblings, 2 replies; 3+ messages in thread
From: Venkata Lakshmi Narayana Gubba @ 2021-03-11 7:03 UTC (permalink / raw)
To: marcel, johan.hedberg
Cc: mka, linux-kernel, linux-bluetooth, hemantg, linux-arm-msm,
bgodavar, rjliao, hbandi, abhishekpandit,
Venkata Lakshmi Narayana Gubba
Based on device may wakeup status, Bluez stack will enable/disable
passive scanning with whitelist in BT controller while suspending.
As interrupt from BT SoC is handled by UART driver,we need to use
device handle of UART driver to get the status of device may wakeup
Signed-off-by: Venkata Lakshmi Narayana Gubba <gubbaven@codeaurora.org>
---
drivers/bluetooth/hci_qca.c | 15 +++++++++++++++
1 file changed, 15 insertions(+)
diff --git a/drivers/bluetooth/hci_qca.c b/drivers/bluetooth/hci_qca.c
index de36af6..73af901 100644
--- a/drivers/bluetooth/hci_qca.c
+++ b/drivers/bluetooth/hci_qca.c
@@ -1571,6 +1571,20 @@ static void qca_cmd_timeout(struct hci_dev *hdev)
mutex_unlock(&qca->hci_memdump_lock);
}
+static bool qca_prevent_wake(struct hci_dev *hdev)
+{
+ struct hci_uart *hu = hci_get_drvdata(hdev);
+ bool wakeup;
+
+ /* UART driver handles the interrupt from BT SoC.So we need to use
+ * device handle of UART driver to get the status of device may wakeup.
+ */
+ wakeup = device_may_wakeup(hu->serdev->ctrl->dev.parent);
+ bt_dev_dbg(hu->hdev, "wakeup status : %d", wakeup);
+
+ return !wakeup;
+}
+
static int qca_wcn3990_init(struct hci_uart *hu)
{
struct qca_serdev *qcadev;
@@ -1721,6 +1735,7 @@ static int qca_setup(struct hci_uart *hu)
qca_debugfs_init(hdev);
hu->hdev->hw_error = qca_hw_error;
hu->hdev->cmd_timeout = qca_cmd_timeout;
+ hu->hdev->prevent_wake = qca_prevent_wake;
} else if (ret == -ENOENT) {
/* No patch/nvm-config found, run with original fw/config */
set_bit(QCA_ROM_FW, &qca->flags);
--
QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a member
of Code Aurora Forum, hosted by The Linux Foundation
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [RFC PATCH v2] Bluetooth: hci_qca: Add device_may_wakeup support
2021-03-11 7:03 [RFC PATCH v2] Bluetooth: hci_qca: Add device_may_wakeup support Venkata Lakshmi Narayana Gubba
@ 2021-03-11 10:49 ` Marcel Holtmann
2021-05-26 19:03 ` patchwork-bot+linux-arm-msm
1 sibling, 0 replies; 3+ messages in thread
From: Marcel Holtmann @ 2021-03-11 10:49 UTC (permalink / raw)
To: Venkata Lakshmi Narayana Gubba
Cc: Johan Hedberg, Matthias Kaehlcke, LKML,
Bluetooth Kernel Mailing List, Hemantg, MSM,
Balakrishna Godavarthi, Rocky Liao, hbandi, abhishekpandit
Hi Venkata,
> Based on device may wakeup status, Bluez stack will enable/disable
> passive scanning with whitelist in BT controller while suspending.
> As interrupt from BT SoC is handled by UART driver,we need to use
> device handle of UART driver to get the status of device may wakeup
>
> Signed-off-by: Venkata Lakshmi Narayana Gubba <gubbaven@codeaurora.org>
> ---
> drivers/bluetooth/hci_qca.c | 15 +++++++++++++++
> 1 file changed, 15 insertions(+)
patch has been applied to bluetooth-next tree.
Regards
Marcel
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [RFC PATCH v2] Bluetooth: hci_qca: Add device_may_wakeup support
2021-03-11 7:03 [RFC PATCH v2] Bluetooth: hci_qca: Add device_may_wakeup support Venkata Lakshmi Narayana Gubba
2021-03-11 10:49 ` Marcel Holtmann
@ 2021-05-26 19:03 ` patchwork-bot+linux-arm-msm
1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+linux-arm-msm @ 2021-05-26 19:03 UTC (permalink / raw)
To: Venkata Lakshmi Narayana Gubba; +Cc: linux-arm-msm
Hello:
This patch was applied to qcom/linux.git (refs/heads/for-next):
On Thu, 11 Mar 2021 12:33:40 +0530 you wrote:
> Based on device may wakeup status, Bluez stack will enable/disable
> passive scanning with whitelist in BT controller while suspending.
> As interrupt from BT SoC is handled by UART driver,we need to use
> device handle of UART driver to get the status of device may wakeup
>
> Signed-off-by: Venkata Lakshmi Narayana Gubba <gubbaven@codeaurora.org>
>
> [...]
Here is the summary with links:
- [RFC,v2] Bluetooth: hci_qca: Add device_may_wakeup support
https://git.kernel.org/qcom/c/c1a74160eaf1
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] 3+ messages in thread
end of thread, other threads:[~2021-05-26 19:04 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-11 7:03 [RFC PATCH v2] Bluetooth: hci_qca: Add device_may_wakeup support Venkata Lakshmi Narayana Gubba
2021-03-11 10:49 ` Marcel Holtmann
2021-05-26 19:03 ` patchwork-bot+linux-arm-msm
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).