Commit 28ac03b9 authored by Chen-Yu Tsai's avatar Chen-Yu Tsai Committed by Marcel Holtmann

Bluetooth: hci_bcm: Handle deferred probing for the clock supply

On some systems that actually have the bluetooth controller wired up
with an extra clock signal, it's possible the bluetooth controller
probes before the clock provider. clk_get would return a defer probe
error, which was not handled by this driver.

Handle this properly, so that these systems can work reliably.
Tested-by: default avatarOndrej Jirman <megous@megous.com>
Signed-off-by: default avatarChen-Yu Tsai <wens@csie.org>
Signed-off-by: default avatarMarcel Holtmann <marcel@holtmann.org>
parent 31f20f5f
...@@ -907,6 +907,10 @@ static int bcm_get_resources(struct bcm_device *dev) ...@@ -907,6 +907,10 @@ static int bcm_get_resources(struct bcm_device *dev)
dev->clk = devm_clk_get(dev->dev, NULL); dev->clk = devm_clk_get(dev->dev, NULL);
/* Handle deferred probing */
if (dev->clk == ERR_PTR(-EPROBE_DEFER))
return PTR_ERR(dev->clk);
dev->device_wakeup = devm_gpiod_get_optional(dev->dev, "device-wakeup", dev->device_wakeup = devm_gpiod_get_optional(dev->dev, "device-wakeup",
GPIOD_OUT_LOW); GPIOD_OUT_LOW);
if (IS_ERR(dev->device_wakeup)) if (IS_ERR(dev->device_wakeup))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment