public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v1 0/1] Bluetooth: hci_qca: only assign wakeup with serial port support
@ 2022-10-13 21:45 Zhengping Jiang
  2022-10-13 21:45 ` [PATCH v1 1/1] " Zhengping Jiang
  2022-10-13 22:30 ` [PATCH v1 0/1] " patchwork-bot+bluetooth
  0 siblings, 2 replies; 3+ messages in thread
From: Zhengping Jiang @ 2022-10-13 21:45 UTC (permalink / raw)
  To: linux-bluetooth, marcel, luiz.dentz
  Cc: Zhengping Jiang, Johan Hedberg, linux-kernel


This patch will check if the serial port supports wakeup before assigning
the hdev->wakeup callback. After landing the 'commit c1a74160eaf1a
("Bluetooth: hci_qca: Add device_may_wakeup support")', the wake-on-bt
was broken in Jacuzzi because the qca_wakeup returns false. In this case
it will fall back to the default hci_uart_wakeup.

Changes in v1:
- Check serial port support before assigning wakeup callback

Zhengping Jiang (1):
  Bluetooth: hci_qca: only assign wakeup with serial port support

 drivers/bluetooth/hci_qca.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

-- 
2.38.0.413.g74048e4d9e-goog


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH v1 1/1] Bluetooth: hci_qca: only assign wakeup with serial port support
  2022-10-13 21:45 [PATCH v1 0/1] Bluetooth: hci_qca: only assign wakeup with serial port support Zhengping Jiang
@ 2022-10-13 21:45 ` Zhengping Jiang
  2022-10-13 22:30 ` [PATCH v1 0/1] " patchwork-bot+bluetooth
  1 sibling, 0 replies; 3+ messages in thread
From: Zhengping Jiang @ 2022-10-13 21:45 UTC (permalink / raw)
  To: linux-bluetooth, marcel, luiz.dentz
  Cc: Zhengping Jiang, Johan Hedberg, linux-kernel

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 <jiangzp@google.com>
---

Changes in v1:
- Check serial port support before assigning wakeup callback

 drivers/bluetooth/hci_qca.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/bluetooth/hci_qca.c b/drivers/bluetooth/hci_qca.c
index 8df11016fd51..dacb6f5efd29 100644
--- a/drivers/bluetooth/hci_qca.c
+++ b/drivers/bluetooth/hci_qca.c
@@ -1765,7 +1765,8 @@ 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->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);
-- 
2.38.0.413.g74048e4d9e-goog


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH v1 0/1] Bluetooth: hci_qca: only assign wakeup with serial port support
  2022-10-13 21:45 [PATCH v1 0/1] Bluetooth: hci_qca: only assign wakeup with serial port support Zhengping Jiang
  2022-10-13 21:45 ` [PATCH v1 1/1] " Zhengping Jiang
@ 2022-10-13 22:30 ` patchwork-bot+bluetooth
  1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+bluetooth @ 2022-10-13 22:30 UTC (permalink / raw)
  To: Zhengping Jiang
  Cc: linux-bluetooth, marcel, luiz.dentz, johan.hedberg, linux-kernel

Hello:

This patch was applied to bluetooth/bluetooth-next.git (master)
by Luiz Augusto von Dentz <luiz.von.dentz@intel.com>:

On Thu, 13 Oct 2022 14:45:07 -0700 you wrote:
> This patch will check if the serial port supports wakeup before assigning
> the hdev->wakeup callback. After landing the 'commit c1a74160eaf1a
> ("Bluetooth: hci_qca: Add device_may_wakeup support")', the wake-on-bt
> was broken in Jacuzzi because the qca_wakeup returns false. In this case
> it will fall back to the default hci_uart_wakeup.
> 
> Changes in v1:
> - Check serial port support before assigning wakeup callback
> 
> [...]

Here is the summary with links:
  - [v1,1/1] Bluetooth: hci_qca: only assign wakeup with serial port support
    https://git.kernel.org/bluetooth/bluetooth-next/c/9fe208c7117d

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:[~2022-10-13 22:30 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-10-13 21:45 [PATCH v1 0/1] Bluetooth: hci_qca: only assign wakeup with serial port support Zhengping Jiang
2022-10-13 21:45 ` [PATCH v1 1/1] " Zhengping Jiang
2022-10-13 22:30 ` [PATCH v1 0/1] " patchwork-bot+bluetooth

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox