summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorMarcel Holtmann <marcel@holtmann.org>2018-03-08 00:39:03 +0300
committerMarcel Holtmann <marcel@holtmann.org>2018-04-01 15:25:30 +0300
commitf3863f1d7a579a8d8d7741a777ef863674a4d0c8 (patch)
treeb1afe6bc72abbd6b01636c7aa4df728d81e3f36f /drivers
parentfb2d466be9b336e9c801978e6a75d06059ac124a (diff)
downloadlinux-f3863f1d7a579a8d8d7741a777ef863674a4d0c8.tar.xz
Bluetooth: hci_bcm: Use default baud rate if missing shutdown GPIO
In case the shutdown GPIO is not wired up, it is impossible to reset the Bluetooth controller to its original state. This include the initial default baud rate which leads to issues when reloading the module or when something unexpected happens. To avoid any kind of runtime deadlocks, stick with the initial default baud rate. Signed-off-by: Marcel Holtmann <marcel@holtmann.org> Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/bluetooth/hci_bcm.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/bluetooth/hci_bcm.c b/drivers/bluetooth/hci_bcm.c
index 467e2f5cb7e3..ff7535e85dea 100644
--- a/drivers/bluetooth/hci_bcm.c
+++ b/drivers/bluetooth/hci_bcm.c
@@ -1146,6 +1146,12 @@ static int bcm_serdev_probe(struct serdev_device *serdev)
if (err)
return err;
+ if (!bcmdev->shutdown) {
+ dev_warn(&serdev->dev,
+ "No reset resource, using default baud rate\n");
+ bcmdev->oper_speed = bcmdev->init_speed;
+ }
+
err = bcm_gpio_set_power(bcmdev, false);
if (err)
dev_err(&serdev->dev, "Failed to power down\n");