[kernel,v1] Bluetooth: hci_qca: get wakeup status from serdev device handle

Message ID 20230202094659.kernel.v1.1.I7d79501f333609addbb0b39803a7bafb99e5b728@changeid
State New
Headers
Series [kernel,v1] Bluetooth: hci_qca: get wakeup status from serdev device handle |

Commit Message

Zhengping Jiang Feb. 2, 2023, 5:47 p.m. UTC
  Bluetooth controller attached via the UART is handled by the serdev driver.
Get the wakeup status from the device handle through serdev, instead of the
parent path.

Fixes: c1a74160eaf1 ("Bluetooth: hci_qca: Add device_may_wakeup support")
Signed-off-by: Zhengping Jiang <jiangzp@google.com>
---

Changes in v1:
- Get wakeup status from device handle of serdev driver

 drivers/bluetooth/hci_qca.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)
  

Comments

patchwork-bot+bluetooth@kernel.org Feb. 2, 2023, 9:20 p.m. UTC | #1
Hello:

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

On Thu,  2 Feb 2023 09:47:01 -0800 you wrote:
> Bluetooth controller attached via the UART is handled by the serdev driver.
> Get the wakeup status from the device handle through serdev, instead of the
> parent path.
> 
> Fixes: c1a74160eaf1 ("Bluetooth: hci_qca: Add device_may_wakeup support")
> Signed-off-by: Zhengping Jiang <jiangzp@google.com>
> 
> [...]

Here is the summary with links:
  - [kernel,v1] Bluetooth: hci_qca: get wakeup status from serdev device handle
    https://git.kernel.org/bluetooth/bluetooth-next/c/3d29daf4b155

You are awesome, thank you!
  

Patch

diff --git a/drivers/bluetooth/hci_qca.c b/drivers/bluetooth/hci_qca.c
index a5c19f32926b..3df8c3606e93 100644
--- a/drivers/bluetooth/hci_qca.c
+++ b/drivers/bluetooth/hci_qca.c
@@ -1588,10 +1588,11 @@  static bool qca_wakeup(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.
+	/* BT SoC attached through the serial bus is handled by the serdev driver.
+	 * So we need to use the device handle of the serdev driver to get the
+	 * status of device may wakeup.
 	 */
-	wakeup = device_may_wakeup(hu->serdev->ctrl->dev.parent);
+	wakeup = device_may_wakeup(&hu->serdev->ctrl->dev);
 	bt_dev_dbg(hu->hdev, "wakeup status : %d", wakeup);
 
 	return wakeup;