mbox series

[0/3] Bluetooth: hci_qca: Add serdev support

Message ID 20180313160326.18180-1-thierry.escande@linaro.org
Headers show
Series Bluetooth: hci_qca: Add serdev support | expand

Message

Thierry Escande March 13, 2018, 4:03 p.m. UTC
Hi,

This patchset enables the Qualcomm BT controller QCA6174 node in the
device tree of the db820c board. This allows the bluetooth chipset to
be probed and registered against the hci layer by using the serdev
framework.

This patchset also contains the documentation for the compatible
string "qcom,qca6174-bt" related to this chipset.

Thierry Escande (3):
  arm64: dts: apq8096-db820c: enable bluetooth node
  dt-bindings: net: bluetooth: Add qualcomm-bluetooth
  Bluetooth: hci_qca: Add serdev support

 .../devicetree/bindings/net/qualcomm-bluetooth.txt |  34 +++++++
 arch/arm64/boot/dts/qcom/apq8096-db820c-pins.dtsi  |  14 +++
 .../boot/dts/qcom/apq8096-db820c-pmic-pins.dtsi    |  17 ++++
 arch/arm64/boot/dts/qcom/apq8096-db820c.dtsi       |  32 +++++++
 arch/arm64/boot/dts/qcom/msm8996.dtsi              |  10 ++
 drivers/bluetooth/Kconfig                          |   2 +-
 drivers/bluetooth/hci_qca.c                        | 102 ++++++++++++++++++++-
 7 files changed, 208 insertions(+), 3 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/net/qualcomm-bluetooth.txt

-- 
2.14.1

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Comments

Loic Poulain March 13, 2018, 6:18 p.m. UTC | #1
On 13 March 2018 at 17:03, Thierry Escande <thierry.escande@linaro.org> wrote:
> From: Thierry Escande <thierry.escande@collabora.com>

>

> Add support for Qualcomm serial slave devices. Probe the serial device,

> retrieve its maximum speed and register a new hci uart device.

>

> Signed-off-by: Thierry Escande <thierry.escande@linaro.org>

> ---

>  drivers/bluetooth/Kconfig   |   2 +-

>  drivers/bluetooth/hci_qca.c | 102 +++++++++++++++++++++++++++++++++++++++++++-

>  2 files changed, 101 insertions(+), 3 deletions(-)

>

> diff --git a/drivers/bluetooth/Kconfig b/drivers/bluetooth/Kconfig

> index 07e55cd8f8c8..c2a6a7ebd14b 100644

> --- a/drivers/bluetooth/Kconfig

> +++ b/drivers/bluetooth/Kconfig

> @@ -195,7 +195,7 @@ config BT_HCIUART_BCM

>

>  config BT_HCIUART_QCA

>         bool "Qualcomm Atheros protocol support"

> -       depends on BT_HCIUART

> +       depends on BT_HCIUART_SERDEV


Driver depends on both BT_HCIUART and BT_HCIUART_SERDEV.

> @@ -386,6 +399,7 @@ static void hci_ibs_wake_retrans_timeout(struct timer_list *t)

>  /* Initialize protocol */

>  static int qca_open(struct hci_uart *hu)

>  {

> +       struct qca_serdev *qcadev;

>         struct qca_data *qca;

>

>         BT_DBG("hu %p qca_open", hu);

> @@ -444,6 +458,13 @@ static int qca_open(struct hci_uart *hu)

>         timer_setup(&qca->tx_idle_timer, hci_ibs_tx_idle_timeout, 0);

>         qca->tx_idle_delay = IBS_TX_IDLE_TIMEOUT_MS;

>

> +       if (hu->serdev) {

> +               serdev_device_open(hu->serdev);

> +

> +               qcadev = serdev_device_get_drvdata(hu->serdev);

> +               gpiod_set_value(qcadev->bt_en, 1);


I suggest to replace gpiod_set_value calls with the _cansleep version.
You always set gpio value from sleepable context and this should avoid
any further issue with different gpio controller.

Regards,
Loic
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html