Bluetooth: hci_ll: add a small delay for wl1271 enable bt_en
authorXiaolei Wang <xiaolei.wang@windriver.com>
Tue, 10 Nov 2020 10:13:11 +0000 (18:13 +0800)
committerMarcel Holtmann <marcel@holtmann.org>
Wed, 11 Nov 2020 09:57:36 +0000 (10:57 +0100)
When using the wl1271 Bluetooth function of am335x, it is found that the
Bluetooth module cannot respond in time after Bluetooth is enabled, and
a small delay is needed to work normally, so whether to add a small
mdelay.

Signed-off-by: Xiaolei Wang <xiaolei.wang@windriver.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
drivers/bluetooth/hci_ll.c

index 8bfe024..eb1e736 100644 (file)
@@ -626,6 +626,7 @@ static int ll_setup(struct hci_uart *hu)
                gpiod_set_value_cansleep(lldev->enable_gpio, 0);
                msleep(5);
                gpiod_set_value_cansleep(lldev->enable_gpio, 1);
+               mdelay(100);
                err = serdev_device_wait_for_cts(serdev, true, 200);
                if (err) {
                        bt_dev_err(hu->hdev, "Failed to get CTS");