Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f3863f1d authored by Marcel Holtmann's avatar Marcel Holtmann
Browse files

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: default avatarMarcel Holtmann <marcel@holtmann.org>
Signed-off-by: default avatarJohan Hedberg <johan.hedberg@intel.com>
parent fb2d466b
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -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");