]> Git Repo - linux.git/commitdiff
Bluetooth: hci_qca: only assign wakeup with serial port support
authorZhengping Jiang <[email protected]>
Thu, 13 Oct 2022 21:45:08 +0000 (14:45 -0700)
committerLuiz Augusto von Dentz <[email protected]>
Mon, 12 Dec 2022 22:19:23 +0000 (14:19 -0800)
Only assign hdev->wakeup if the serial port supports wakeup. Otherwise
it will fall back to the hci_uart_wakeup or the behavior that can be
overridden before calling the hci_uart_register_device().

Signed-off-by: Zhengping Jiang <[email protected]>
Signed-off-by: Luiz Augusto von Dentz <[email protected]>
drivers/bluetooth/hci_qca.c

index 8df11016fd51b2890cbc6d220f582b550a2d7585..dacb6f5efd2900425f48509fb36011dca56c947d 100644 (file)
@@ -1765,7 +1765,8 @@ retry:
                qca_debugfs_init(hdev);
                hu->hdev->hw_error = qca_hw_error;
                hu->hdev->cmd_timeout = qca_cmd_timeout;
-               hu->hdev->wakeup = qca_wakeup;
+               if (device_can_wakeup(hu->serdev->ctrl->dev.parent))
+                       hu->hdev->wakeup = qca_wakeup;
        } else if (ret == -ENOENT) {
                /* No patch/nvm-config found, run with original fw/config */
                set_bit(QCA_ROM_FW, &qca->flags);
This page took 0.059177 seconds and 4 git commands to generate.