mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH v4 0/2] Bluetooth: hci_qca: Reopen the UART after enabling QCA2066
@ 2026-11-10  9:29 Shuai Zhang
  2026-11-10  9:29 ` [PATCH v4 1/2] " Shuai Zhang
                   ` (3 more replies)
  0 siblings, 4 replies; 6+ messages in thread
From: Shuai Zhang @ 2026-11-10  9:29 UTC (permalink / raw)
  To: Bartosz Golaszewski, Marcel Holtmann, Luiz Augusto von Dentz
  Cc: linux-arm-msm, linux-bluetooth, linux-kernel, cheng.jiang,
	xiuzhuo.shang, wei.deng, jinwang.li, Shuai Zhang

QCA2066 does not reopen the UART after the controller is enabled, which
causes RX/TX out-of-sync errors. The UART has to be reopened once the
controller is powered on.

qca_regulator_init() already enables the controller and then reopens the
UART, but QCA2066 does not go through it. QCA2066 was added with its own
SoC type and handled in the default case.

Let QCA2066 go through qca_regulator_init() as well, and handle it in the
other places that check the SoC type in the same way.

Patch 1 reopens the UART after enabling QCA2066.

Patch 2 keeps HCI_UART_PROTO_READY in sync with the port state, so that a
port which failed to reopen is not closed or flushed again.

Changes in v4:
- Let QCA2066 go through qca_regulator_init() instead of adding a QCA2066
  specific case.
- Link to v3
  https://lore.kernel.org/all/20261028111839.2148515-1-shuai.zhang@oss.qualcomm.com/

Changes in v3:
- Patch 1 is unchanged from v2.
- Add patch 2. If serdev_device_open() fails during the reopen, the
  port stays closed but HCI_UART_PROTO_READY stays set, so the later
  serdev_device_close() and hci_uart_flush() use a closed port. Keep
  the flag in sync with the port state and skip the port flush when
  the port is not open.
- Link to v2:
  https://lore.kernel.org/all/20261016022302.4003647-1-shuai.zhang@oss.qualcomm.com/

Changes in v2:
- Use a separate case for clearer logic.
- Link to v1:
  https://lore.kernel.org/all/20261015092224.262158-1-shuai.zhang@oss.qualcomm.com/

Shuai Zhang (2):
  Bluetooth: hci_qca: Reopen the UART after enabling QCA2066
  Bluetooth: hci_qca: Don't use the serdev port after a failed reopen

 drivers/bluetooth/btqca.c      |  1 +
 drivers/bluetooth/hci_qca.c    | 46 +++++++++++++++++++++++++++++-----
 drivers/bluetooth/hci_serdev.c |  6 +++--
 3 files changed, 45 insertions(+), 8 deletions(-)

-- 
2.34.1


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2026-11-10 16:10 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-10  9:29 [PATCH v4 0/2] Bluetooth: hci_qca: Reopen the UART after enabling QCA2066 Shuai Zhang
2026-11-10  9:29 ` [PATCH v4 1/2] " Shuai Zhang
2026-11-10 13:52   ` Bartosz Golaszewski
2026-11-10  9:29 ` [PATCH v4 2/2] Bluetooth: hci_qca: Don't use the serdev port after a failed reopen Shuai Zhang
2026-11-10 13:51 ` [PATCH v4 0/2] Bluetooth: hci_qca: Reopen the UART after enabling QCA2066 Bartosz Golaszewski
2026-11-10 16:10 ` patchwork-bot+bluetooth

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®