mirror of
https://github.com/torvalds/linux.git
synced 2026-11-06 21:58:01 +01:00
Bluetooth: hci_ll: Sleep while waiting for the controller to power up
ll_setup() busy-waits for 100 ms after asserting the controller enable GPIO on each firmware download attempt. With retries this can occupy the CPU for up to 400 ms. The setup callback runs in sleepable context and already uses msleep(), gpiod_set_value_cansleep() and synchronous firmware commands. Replace mdelay(100) with msleep(100) so the CPU can run other work during the power-up delay. Keep the requested delay and subsequent CTS wait. Signed-off-by: Xuhua Zhang <zhangxuhua@kylinsec.com.cn> Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
This commit is contained in:
parent
c84f9fc657
commit
09cf09f752
|
|
@ -629,7 +629,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);
|
||||
msleep(100);
|
||||
err = serdev_device_wait_for_cts(serdev, true, 200);
|
||||
if (err) {
|
||||
bt_dev_err(hu->hdev, "Failed to get CTS");
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user