Commit 201a1124 authored by Balakrishna Godavarthi's avatar Balakrishna Godavarthi Committed by Marcel Holtmann

Bluetooth: hci_qca: Request Tx clock vote off only when Tx is pending

Tx pending flag is set to true when HOST IBS state is AWAKE or
AWAKEING. If IBS state is ASLEEP, then Tx clock is already voted
off. To optimize further directly calling serial_clock_vote()
instead of qca_wq_serial_tx_clock_vote_off(), at this point of
qca_suspend() already data is sent out. No need to wake up hci to
send data.
Signed-off-by: default avatarBalakrishna Godavarthi <bgodavar@codeaurora.org>
Signed-off-by: default avatarMarcel Holtmann <marcel@holtmann.org>
parent 2d68476c
...@@ -2107,6 +2107,7 @@ static int __maybe_unused qca_suspend(struct device *dev) ...@@ -2107,6 +2107,7 @@ static int __maybe_unused qca_suspend(struct device *dev)
if (tx_pending) { if (tx_pending) {
serdev_device_wait_until_sent(hu->serdev, serdev_device_wait_until_sent(hu->serdev,
msecs_to_jiffies(CMD_TRANS_TIMEOUT_MS)); msecs_to_jiffies(CMD_TRANS_TIMEOUT_MS));
serial_clock_vote(HCI_IBS_TX_VOTE_CLOCK_OFF, hu);
} }
/* Wait for HCI_IBS_SLEEP_IND sent by device to indicate its Tx is going /* Wait for HCI_IBS_SLEEP_IND sent by device to indicate its Tx is going
...@@ -2120,7 +2121,6 @@ static int __maybe_unused qca_suspend(struct device *dev) ...@@ -2120,7 +2121,6 @@ static int __maybe_unused qca_suspend(struct device *dev)
goto error; goto error;
} }
qca_wq_serial_tx_clock_vote_off(&qca->ws_tx_vote_off);
return 0; return 0;
error: error:
......
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