@@ -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);
}
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(-)