]> asedeno.scripts.mit.edu Git - linux.git/commit
Bluetooth: serdev: hci_ll: Wait for CTS instead of using msleep
authorDavid Lechner <david@lechnology.com>
Sun, 3 Dec 2017 02:43:55 +0000 (20:43 -0600)
committerMarcel Holtmann <marcel@holtmann.org>
Tue, 12 Dec 2017 23:28:41 +0000 (00:28 +0100)
commitd54fdcf9244ceca3e2768878b7512f12725437d1
tree0ca0f48f306b31a9aa37fbf88db9e9299ea4549d
parent059fb8230732d101950ae1d435238d78545cf46b
Bluetooth: serdev: hci_ll: Wait for CTS instead of using msleep

When a TI Bluetooth chip is reset, it takes about 100ms for the RTS line of
the chip to deassert. For my use case with a TI CC2560A chip, this delay
was not long enough and caused the local UART to never transmit at all (TI
AM1808 SoC UART2).

We can wait for the CTS signal using serdev_device_wait_for_cts() instead
of trying to guess using msleep().

Also changed the comment to be more informative while we are touching this
code.

Signed-off-by: David Lechner <david@lechnology.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
drivers/bluetooth/hci_ll.c