Skip to contentSkip to conversation

Patch "Bluetooth: hci_bcm: Make shutdown and device wake GPIO optional" has been added to the 4.15-stable tree

PATCH [email protected] 1 participant 1 message Apr 9, 2018

Subsystems (2)
lore
Share & tools
lore

[email protected]

author maintainer Applied
#0 lore raw

This is a note to let you know that I've just added the patch titled

Bluetooth: hci_bcm: Make shutdown and device wake GPIO optional

to the 4.15-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
bluetooth-hci_bcm-make-shutdown-and-device-wake-gpio-optional.patch
and it can be found in the queue-4.15 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.

Quoted 1 line

From ab2f336cb7e629de74d8af06bcaf6b15e4230e19 Mon Sep 17 00:00:00 2001

From: Stefan Wahren <[email protected]>
Date: Sun, 25 Feb 2018 15:10:52 +0100
Subject: Bluetooth: hci_bcm: Make shutdown and device wake GPIO optional

From: Stefan Wahren <[email protected]>

commit ab2f336cb7e629de74d8af06bcaf6b15e4230e19 upstream.

According to the devicetree binding the shutdown and device wake GPIOs are optional. Since commit 3e81a4ca51a1 ("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 3e81a4ca51a1 ("Bluetooth: hci_bcm: Mandate presence of shutdown and device wake GPIO")
---
 drivers/bluetooth/hci_bcm.c |    7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)
drivers/bluetooth/hci_bcm.c +4 -3
@@ -775,12 +775,13 @@ static int bcm_get_resources(struct bcm_
 
 	dev->clk = devm_clk_get(dev->dev, NULL);
 
-	dev->device_wakeup = devm_gpiod_get(dev->dev, "device-wakeup",
-					    GPIOD_OUT_LOW);
+	dev->device_wakeup = devm_gpiod_get_optional(dev->dev, "device-wakeup",
+						     GPIOD_OUT_LOW);
 	if (IS_ERR(dev->device_wakeup))
 		return PTR_ERR(dev->device_wakeup);
 
-	dev->shutdown = devm_gpiod_get(dev->dev, "shutdown", GPIOD_OUT_LOW);
+	dev->shutdown = devm_gpiod_get_optional(dev->dev, "shutdown",
+						GPIOD_OUT_LOW);
 	if (IS_ERR(dev->shutdown))
 		return PTR_ERR(dev->shutdown);
 

Patches currently in stable-queue which might be from [email protected] are

queue-4.15/bluetooth-hci_bcm-make-shutdown-and-device-wake-gpio-optional.patch