* [RFC PATCH v1] Bluetooth: hci_qca: Add device_may_wakeup support
@ 2021-03-10 11:41 Venkata Lakshmi Narayana Gubba
2021-03-10 12:11 ` [RFC,v1] " bluez.test.bot
2021-03-10 15:02 ` [RFC PATCH v1] " Bjorn Andersson
0 siblings, 2 replies; 4+ messages in thread
From: Venkata Lakshmi Narayana Gubba @ 2021-03-10 11:41 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
Added device_may_wakeup() support.
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] 4+ messages in thread
* RE: [RFC,v1] Bluetooth: hci_qca: Add device_may_wakeup support
2021-03-10 11:41 [RFC PATCH v1] Bluetooth: hci_qca: Add device_may_wakeup support Venkata Lakshmi Narayana Gubba
@ 2021-03-10 12:11 ` bluez.test.bot
2021-03-10 15:02 ` [RFC PATCH v1] " Bjorn Andersson
1 sibling, 0 replies; 4+ messages in thread
From: bluez.test.bot @ 2021-03-10 12:11 UTC (permalink / raw)
To: linux-bluetooth, gubbaven
[-- Attachment #1: Type: text/plain, Size: 1599 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=445355
---Test result---
##############################
Test: CheckPatch - PASS
##############################
Test: CheckGitLint - PASS
##############################
Test: CheckBuildK - PASS
##############################
Test: CheckTestRunner: Setup - PASS
##############################
Test: CheckTestRunner: l2cap-tester - PASS
Total: 40, Passed: 34 (85.0%), Failed: 0, Not Run: 6
##############################
Test: CheckTestRunner: bnep-tester - PASS
Total: 1, Passed: 1 (100.0%), Failed: 0, Not Run: 0
##############################
Test: CheckTestRunner: mgmt-tester - FAIL
Total: 416, Passed: 397 (95.4%), Failed: 3, Not Run: 16
##############################
Test: CheckTestRunner: rfcomm-tester - PASS
Total: 9, Passed: 9 (100.0%), Failed: 0, Not Run: 0
##############################
Test: CheckTestRunner: sco-tester - PASS
Total: 8, Passed: 8 (100.0%), Failed: 0, Not Run: 0
##############################
Test: CheckTestRunner: smp-tester - PASS
Total: 8, Passed: 8 (100.0%), Failed: 0, Not Run: 0
##############################
Test: CheckTestRunner: userchan-tester - PASS
Total: 3, Passed: 3 (100.0%), Failed: 0, Not Run: 0
---
Regards,
Linux Bluetooth
[-- Attachment #2: l2cap-tester.log --]
[-- Type: application/octet-stream, Size: 43342 bytes --]
[-- Attachment #3: bnep-tester.log --]
[-- Type: application/octet-stream, Size: 3533 bytes --]
[-- Attachment #4: mgmt-tester.log --]
[-- Type: application/octet-stream, Size: 546674 bytes --]
[-- Attachment #5: rfcomm-tester.log --]
[-- Type: application/octet-stream, Size: 11653 bytes --]
[-- Attachment #6: sco-tester.log --]
[-- Type: application/octet-stream, Size: 9888 bytes --]
[-- Attachment #7: smp-tester.log --]
[-- Type: application/octet-stream, Size: 11799 bytes --]
[-- Attachment #8: userchan-tester.log --]
[-- Type: application/octet-stream, Size: 5429 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [RFC PATCH v1] Bluetooth: hci_qca: Add device_may_wakeup support
2021-03-10 11:41 [RFC PATCH v1] Bluetooth: hci_qca: Add device_may_wakeup support Venkata Lakshmi Narayana Gubba
2021-03-10 12:11 ` [RFC,v1] " bluez.test.bot
@ 2021-03-10 15:02 ` Bjorn Andersson
2021-03-11 6:01 ` gubbaven
1 sibling, 1 reply; 4+ messages in thread
From: Bjorn Andersson @ 2021-03-10 15:02 UTC (permalink / raw)
To: Venkata Lakshmi Narayana Gubba
Cc: marcel, johan.hedberg, mka, linux-kernel, linux-bluetooth,
hemantg, linux-arm-msm, bgodavar, rjliao, hbandi, abhishekpandit
On Wed 10 Mar 05:41 CST 2021, Venkata Lakshmi Narayana Gubba wrote:
> Added device_may_wakeup() support.
This would be an excellent place to describe _why_ this is necessary,
instead of just repeating $subject.
Something along the lines of the comment in the patch.
Regards,
Bjorn
>
> 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 [flat|nested] 4+ messages in thread
* Re: [RFC PATCH v1] Bluetooth: hci_qca: Add device_may_wakeup support
2021-03-10 15:02 ` [RFC PATCH v1] " Bjorn Andersson
@ 2021-03-11 6:01 ` gubbaven
0 siblings, 0 replies; 4+ messages in thread
From: gubbaven @ 2021-03-11 6:01 UTC (permalink / raw)
To: Bjorn Andersson
Cc: marcel, johan.hedberg, mka, linux-kernel, linux-bluetooth,
hemantg, linux-arm-msm, bgodavar, rjliao, hbandi, abhishekpandit
Hi Bjorn,
On 2021-03-10 20:32, Bjorn Andersson wrote:
> On Wed 10 Mar 05:41 CST 2021, Venkata Lakshmi Narayana Gubba wrote:
>
>> Added device_may_wakeup() support.
>
> This would be an excellent place to describe _why_ this is necessary,
> instead of just repeating $subject.
>
> Something along the lines of the comment in the patch.
>
> Regards,
> Bjorn
>
[Venkata]:
Sure.I will update in next patch.
>>
>> 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
>>
Regards,
Venkata.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2021-03-11 6:02 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-10 11:41 [RFC PATCH v1] Bluetooth: hci_qca: Add device_may_wakeup support Venkata Lakshmi Narayana Gubba
2021-03-10 12:11 ` [RFC,v1] " bluez.test.bot
2021-03-10 15:02 ` [RFC PATCH v1] " Bjorn Andersson
2021-03-11 6:01 ` gubbaven
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.