lkml.org 
[lkml]   [2020]   [Jan]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH v2 2/3] Bluetooth: hci_qca: Move the power on from open() to setup() for QCA Rome
Date
This patch moves the btsoc power on from hdev->open() to hdev->setup() for
QCA Rome. And it calls the unified qca_power_on() API to perform the Rome
power on operation.

Signed-off-by: Rocky Liao <rjliao@codeaurora.org>
---

Changes in v2: Added this patch

drivers/bluetooth/hci_qca.c | 10 ++++------
1 file changed, 4 insertions(+), 6 deletions(-)

diff --git a/drivers/bluetooth/hci_qca.c b/drivers/bluetooth/hci_qca.c
index f6555bd1adbc..8fc8c9bce9ee 100644
--- a/drivers/bluetooth/hci_qca.c
+++ b/drivers/bluetooth/hci_qca.c
@@ -582,13 +582,8 @@ static int qca_open(struct hci_uart *hu)
hu->priv = qca;

if (hu->serdev) {
-
qcadev = serdev_device_get_drvdata(hu->serdev);
- if (!qca_is_wcn399x(qcadev->btsoc_type)) {
- gpiod_set_value_cansleep(qcadev->bt_en, 1);
- /* Controller needs time to bootup. */
- msleep(150);
- } else {
+ if (qca_is_wcn399x(qcadev->btsoc_type)) {
hu->init_speed = qcadev->init_speed;
hu->oper_speed = qcadev->oper_speed;
ret = qca_regulator_enable(qcadev);
@@ -1593,6 +1588,9 @@ static int qca_setup(struct hci_uart *hu)
return ret;
} else {
bt_dev_info(hdev, "ROME setup");
+ ret = qca_power_on(hdev);
+ if (ret)
+ return ret;
qca_set_speed(hu, QCA_INIT_SPEED);
}

--
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project
\
 
 \ /
  Last update: 2020-01-08 10:09    [W:0.071 / U:7.716 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site