From 09cf09f752ddd2fecad2aff0d053d90872d55adb Mon Sep 17 00:00:00 2001 From: Xuhua Zhang Date: Mon, 7 Sep 2026 23:12:45 +0800 Subject: [PATCH] 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 Signed-off-by: Luiz Augusto von Dentz --- drivers/bluetooth/hci_ll.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/bluetooth/hci_ll.c b/drivers/bluetooth/hci_ll.c index ab744001dafc..35adf869cc1f 100644 --- a/drivers/bluetooth/hci_ll.c +++ b/drivers/bluetooth/hci_ll.c @@ -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");