Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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: Balakrishna Godavarthi <bgodavar@codeaurora.org>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>

authored by

Balakrishna Godavarthi and committed by
Marcel Holtmann
201a1124 2d68476c

+1 -1
+1 -1
drivers/bluetooth/hci_qca.c
··· 2107 2107 if (tx_pending) { 2108 2108 serdev_device_wait_until_sent(hu->serdev, 2109 2109 msecs_to_jiffies(CMD_TRANS_TIMEOUT_MS)); 2110 + serial_clock_vote(HCI_IBS_TX_VOTE_CLOCK_OFF, hu); 2110 2111 } 2111 2112 2112 2113 /* Wait for HCI_IBS_SLEEP_IND sent by device to indicate its Tx is going ··· 2121 2120 goto error; 2122 2121 } 2123 2122 2124 - qca_wq_serial_tx_clock_vote_off(&qca->ws_tx_vote_off); 2125 2123 return 0; 2126 2124 2127 2125 error: