All of lore.kernel.org
 help / color / mirror / Atom feed
From: Hakan Jansson <hakan.jansson@infineon.com>
To: unlisted-recipients:; (no To-header on input)
Cc: Hakan Jansson <hakan.jansson@infineon.com>,
	Linus Walleij <linus.walleij@linaro.org>,
	"David S. Miller" <davem@davemloft.net>,
	"Eric Dumazet" <edumazet@google.com>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	Rob Herring <robh+dt@kernel.org>,
	Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
	<netdev@vger.kernel.org>, <devicetree@vger.kernel.org>,
	<linux-kernel@vger.kernel.org>,
	Marcel Holtmann <marcel@holtmann.org>,
	Johan Hedberg <johan.hedberg@gmail.com>,
	"Luiz Augusto von Dentz" <luiz.dentz@gmail.com>,
	<linux-bluetooth@vger.kernel.org>
Subject: [PATCH v2 4/5] Bluetooth: hci_bcm: Prevent early baudrate setting in autobaud mode
Date: Thu, 30 Jun 2022 14:45:23 +0200	[thread overview]
Message-ID: <a211533dc6c9a0d5a5d1533d24a26fb996d45dc7.1656583541.git.hakan.jansson@infineon.com> (raw)
In-Reply-To: <cover.1656583541.git.hakan.jansson@infineon.com>

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@infineon.com>
Reviewed-by: Linus Walleij <linus.walleij@linaro.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


  parent reply	other threads:[~2022-06-30 12:46 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-30 12:45 [PATCH v2 0/5] Bluetooth: hci_bcm: Improve FW load time on CYW55572 Hakan Jansson
2022-06-30 12:45 ` [PATCH v2 1/5] dt-bindings: net: broadcom-bluetooth: Add CYW55572 DT binding Hakan Jansson
2022-06-30 13:32   ` Bluetooth: hci_bcm: Improve FW load time on CYW55572 bluez.test.bot
2022-07-11  8:31   ` [PATCH v2 1/5] dt-bindings: net: broadcom-bluetooth: Add CYW55572 DT binding Linus Walleij
2022-06-30 12:45 ` [PATCH v2 2/5] dt-bindings: net: broadcom-bluetooth: Add conditional constraints Hakan Jansson
2022-07-01 20:13   ` Rob Herring
2022-07-11  8:32   ` Linus Walleij
2022-06-30 12:45 ` [PATCH v2 3/5] Bluetooth: hci_bcm: Add DT compatible for CYW55572 Hakan Jansson
2022-07-11  8:33   ` Linus Walleij
2022-06-30 12:45 ` Hakan Jansson [this message]
2022-06-30 12:53 ` [PATCH v2 5/5] Bluetooth: hci_bcm: Increase host baudrate for CYW55572 in autobaud mode Hakan Jansson
2022-07-11  8:34   ` Linus Walleij
2022-07-20 16:20 ` [PATCH v2 0/5] Bluetooth: hci_bcm: Improve FW load time on CYW55572 patchwork-bot+bluetooth

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=a211533dc6c9a0d5a5d1533d24a26fb996d45dc7.1656583541.git.hakan.jansson@infineon.com \
    --to=hakan.jansson@infineon.com \
    --cc=davem@davemloft.net \
    --cc=devicetree@vger.kernel.org \
    --cc=edumazet@google.com \
    --cc=johan.hedberg@gmail.com \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=kuba@kernel.org \
    --cc=linus.walleij@linaro.org \
    --cc=linux-bluetooth@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=luiz.dentz@gmail.com \
    --cc=marcel@holtmann.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=robh+dt@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.