[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAMZdPi-hoqhX_S-nFeE6ABUOZAp6oPtZqpLbpXoe5jDqmiFozA@mail.gmail.com>
Date: Tue, 13 Mar 2018 19:18:57 +0100
From: Loic Poulain <loic.poulain@...aro.org>
To: Thierry Escande <thierry.escande@...aro.org>
Cc: Rob Herring <robh+dt@...nel.org>,
Andy Gross <andy.gross@...aro.org>,
Marcel Holtmann <marcel@...tmann.org>,
Johan Hedberg <johan.hedberg@...il.com>,
David Brown <david.brown@...aro.org>,
Mark Rutland <mark.rutland@....com>,
Bjorn Andersson <bjorn.andersson@...aro.org>,
Srinivas Kandagatla <srinivas.kandagatla@...aro.org>,
"open list:BLUETOOTH DRIVERS" <linux-bluetooth@...r.kernel.org>,
linux-arm-msm@...r.kernel.org,
devicetree <devicetree@...r.kernel.org>,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH 3/3] Bluetooth: hci_qca: Add serdev support
On 13 March 2018 at 17:03, Thierry Escande <thierry.escande@...aro.org> wrote:
> From: Thierry Escande <thierry.escande@...labora.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@...aro.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
Powered by blists - more mailing lists