Commit 010376ab authored by Harish Bandi's avatar Harish Bandi Committed by Marcel Holtmann

Bluetooth: hci_qca: wait for Pre shutdown complete event before sending the Power off pulse

When SoC receives pre shut down command, it share the same
with other COEX shared clients. So SoC needs a short time
after sending VS pre shutdown command before turning off
the regulators and sending the power off pulse. Along with
short delay, needs to wait for command complete event for
Pre shutdown VS command
Signed-off-by: default avatarHarish Bandi <c-hbandi@codeaurora.org>
Reviewed-by: default avatarBalakrishna Godavarthi <bgodavar@codeaurora.org>
Signed-off-by: default avatarMarcel Holtmann <marcel@holtmann.org>
parent 16946de5
...@@ -106,8 +106,9 @@ int qca_send_pre_shutdown_cmd(struct hci_dev *hdev) ...@@ -106,8 +106,9 @@ int qca_send_pre_shutdown_cmd(struct hci_dev *hdev)
bt_dev_dbg(hdev, "QCA pre shutdown cmd"); bt_dev_dbg(hdev, "QCA pre shutdown cmd");
skb = __hci_cmd_sync(hdev, QCA_PRE_SHUTDOWN_CMD, 0, skb = __hci_cmd_sync_ev(hdev, QCA_PRE_SHUTDOWN_CMD, 0,
NULL, HCI_INIT_TIMEOUT); NULL, HCI_EV_CMD_COMPLETE, HCI_INIT_TIMEOUT);
if (IS_ERR(skb)) { if (IS_ERR(skb)) {
err = PTR_ERR(skb); err = PTR_ERR(skb);
bt_dev_err(hdev, "QCA preshutdown_cmd failed (%d)", err); bt_dev_err(hdev, "QCA preshutdown_cmd failed (%d)", err);
......
...@@ -1375,6 +1375,8 @@ static int qca_power_off(struct hci_dev *hdev) ...@@ -1375,6 +1375,8 @@ static int qca_power_off(struct hci_dev *hdev)
/* Perform pre shutdown command */ /* Perform pre shutdown command */
qca_send_pre_shutdown_cmd(hdev); qca_send_pre_shutdown_cmd(hdev);
usleep_range(8000, 10000);
qca_power_shutdown(hu); qca_power_shutdown(hu);
return 0; return 0;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment