Skip to content

Commit ab2f336

Browse files
lategoodbyeholtmann
authored andcommitted
Bluetooth: hci_bcm: Make shutdown and device wake GPIO optional
According to the devicetree binding the shutdown and device wake GPIOs are optional. Since commit 3e81a4c ("Bluetooth: hci_bcm: Mandate presence of shutdown and device wake GPIO") this driver won't probe anymore on Raspberry Pi 3 and Zero W (no device wake GPIO connected). So fix this regression by reverting this commit partially. Fixes: 3e81a4c ("Bluetooth: hci_bcm: Mandate presence of shutdown and device wake GPIO") Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com> Reviewed-by: Lukas Wunner <lukas@wunner.de> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
1 parent 1fdb926 commit ab2f336

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

drivers/bluetooth/hci_bcm.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -922,12 +922,13 @@ static int bcm_get_resources(struct bcm_device *dev)
922922

923923
dev->clk = devm_clk_get(dev->dev, NULL);
924924

925-
dev->device_wakeup = devm_gpiod_get(dev->dev, "device-wakeup",
926-
GPIOD_OUT_LOW);
925+
dev->device_wakeup = devm_gpiod_get_optional(dev->dev, "device-wakeup",
926+
GPIOD_OUT_LOW);
927927
if (IS_ERR(dev->device_wakeup))
928928
return PTR_ERR(dev->device_wakeup);
929929

930-
dev->shutdown = devm_gpiod_get(dev->dev, "shutdown", GPIOD_OUT_LOW);
930+
dev->shutdown = devm_gpiod_get_optional(dev->dev, "shutdown",
931+
GPIOD_OUT_LOW);
931932
if (IS_ERR(dev->shutdown))
932933
return PTR_ERR(dev->shutdown);
933934

0 commit comments

Comments
 (0)