[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <a211533dc6c9a0d5a5d1533d24a26fb996d45dc7.1656583541.git.hakan.jansson@infineon.com>
Date: Thu, 30 Jun 2022 14:45:23 +0200
From: Hakan Jansson <hakan.jansson@...ineon.com>
To: unlisted-recipients:; (no To-header on input)
CC: Hakan Jansson <hakan.jansson@...ineon.com>,
Linus Walleij <linus.walleij@...aro.org>,
"David S. Miller" <davem@...emloft.net>,
"Eric Dumazet" <edumazet@...gle.com>,
Jakub Kicinski <kuba@...nel.org>,
Paolo Abeni <pabeni@...hat.com>,
Rob Herring <robh+dt@...nel.org>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@...aro.org>,
<netdev@...r.kernel.org>, <devicetree@...r.kernel.org>,
<linux-kernel@...r.kernel.org>,
Marcel Holtmann <marcel@...tmann.org>,
Johan Hedberg <johan.hedberg@...il.com>,
"Luiz Augusto von Dentz" <luiz.dentz@...il.com>,
<linux-bluetooth@...r.kernel.org>
Subject: [PATCH v2 4/5] Bluetooth: hci_bcm: Prevent early baudrate setting in autobaud mode
Always prevent trying to set device baudrate before calling setup() when
using autobaud mode.
This was previously happening for devices which had device specific data
with member no_early_set_baudrate set to 0.
Signed-off-by: Hakan Jansson <hakan.jansson@...ineon.com>
Reviewed-by: Linus Walleij <linus.walleij@...aro.org>
---
V1 -> V2:
- No changes, submitted as part of updated patch series
drivers/bluetooth/hci_bcm.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/drivers/bluetooth/hci_bcm.c b/drivers/bluetooth/hci_bcm.c
index 9a129867a4c0..0ae627c293c5 100644
--- a/drivers/bluetooth/hci_bcm.c
+++ b/drivers/bluetooth/hci_bcm.c
@@ -484,7 +484,7 @@ static int bcm_open(struct hci_uart *hu)
/* If oper_speed is set, ldisc/serdev will set the baudrate
* before calling setup()
*/
- if (!bcm->dev->no_early_set_baudrate)
+ if (!bcm->dev->no_early_set_baudrate && !bcm->dev->use_autobaud_mode)
hu->oper_speed = bcm->dev->oper_speed;
err = bcm_gpio_set_power(bcm->dev, true);
@@ -1204,9 +1204,6 @@ static int bcm_of_probe(struct bcm_device *bdev)
{
bdev->use_autobaud_mode = device_property_read_bool(bdev->dev,
"brcm,requires-autobaud-mode");
- if (bdev->use_autobaud_mode)
- bdev->no_early_set_baudrate = true;
-
device_property_read_u32(bdev->dev, "max-speed", &bdev->oper_speed);
device_property_read_u8_array(bdev->dev, "brcm,bt-pcm-int-params",
bdev->pcm_int_params, 5);
--
2.25.1
Powered by blists - more mailing lists