diff options
author | Matthias Kaehlcke <mka@chromium.org> | 2019-02-26 14:46:47 -0500 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2019-02-27 02:44:33 -0500 |
commit | 0ebcddd8e06e94e476f4718af238e9ae67531b04 (patch) | |
tree | e6ad64e9d014cb203292792231d8c2f942184f41 /drivers/bluetooth | |
parent | ad571d725c9786a138d663fb26ae91d84e705900 (diff) |
Bluetooth: hci_qca: Add delay after power-off pulse
During initialization the power-on pulse is currently sent inmediately
after the prior power-off pulse. With this initialization often fails
at boot time:
[ 15.205224] Bluetooth: hci0: setting up wcn3990
[ 17.341062] Bluetooth: hci0: command 0xfc00 tx timeout
[ 22.101453] ERROR: Bluetooth initialization failed
[ 25.337740] Bluetooth: hci0: Reading QCA version information failed (-110)
After a power-off pulse wait 10ms to give the controller time to power
off. Remove the previous short settling delay, it isn't needed anymore.
Signed-off-by: Matthias Kaehlcke <mka@chromium.org>
Reviewed-by: Balakrishna Godavarthi <bgodavar@codeaurora.org>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Diffstat (limited to 'drivers/bluetooth')
-rw-r--r-- | drivers/bluetooth/hci_qca.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/bluetooth/hci_qca.c b/drivers/bluetooth/hci_qca.c index bcc70352eb95..f56d2459ea19 100644 --- a/drivers/bluetooth/hci_qca.c +++ b/drivers/bluetooth/hci_qca.c | |||
@@ -1031,13 +1031,13 @@ static int qca_send_power_pulse(struct hci_uart *hu, bool on) | |||
1031 | } | 1031 | } |
1032 | 1032 | ||
1033 | serdev_device_wait_until_sent(hu->serdev, timeout); | 1033 | serdev_device_wait_until_sent(hu->serdev, timeout); |
1034 | |||
1035 | /* Wait for 100 uS for SoC to settle down */ | ||
1036 | usleep_range(100, 200); | ||
1037 | hci_uart_set_flow_control(hu, false); | 1034 | hci_uart_set_flow_control(hu, false); |
1038 | 1035 | ||
1036 | /* Give to controller time to boot/shutdown */ | ||
1039 | if (on) | 1037 | if (on) |
1040 | msleep(100); | 1038 | msleep(100); |
1039 | else | ||
1040 | msleep(10); | ||
1041 | 1041 | ||
1042 | return 0; | 1042 | return 0; |
1043 | } | 1043 | } |