]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
bluetooth: hci_bcm: Give more time to come out of reset
authorOndrej Jirman <megous@megous.com>
Fri, 23 Aug 2019 10:31:37 +0000 (12:31 +0200)
committerMarcel Holtmann <marcel@holtmann.org>
Thu, 5 Sep 2019 15:27:22 +0000 (17:27 +0200)
Some supported devices need more time to come out of reset (eg.
BCM4345C5 in AP6256).

I don't have/found a datasheet, so the value was arrive at
experimentally with the Oprange Pi 3 board. Without increased delay,
I got intermittent failures during probe. This is a Bluetooth 5.0
device, so maybe that's why it takes longer to initialize than the
others.

Signed-off-by: Ondrej Jirman <megous@megous.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
drivers/bluetooth/hci_bcm.c

index 95c312ae94cf65ddf48796c06af5e09b7e02dc06..7646636f2d183d5c38cdf8d5412afd2373d9886d 100644 (file)
@@ -260,7 +260,7 @@ static int bcm_gpio_set_power(struct bcm_device *dev, bool powered)
        }
 
        /* wait for device to power on and come out of reset */
-       usleep_range(1000020000);
+       usleep_range(100000, 120000);
 
        dev->res_enabled = powered;