[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20240730-qca6390_fix-v1-1-e0340a511756@icloud.com>
Date: Tue, 30 Jul 2024 00:22:02 +0800
From: Zijun Hu <zijun_hu@...oud.com>
To: Marcel Holtmann <marcel@...tmann.org>,
Luiz Augusto von Dentz <luiz.dentz@...il.com>
Cc: linux-bluetooth@...r.kernel.org, linux-kernel@...r.kernel.org,
Zijun Hu <zijun_hu@...oud.com>
Subject: [PATCH] Bluetooth: hci_qca: [Don't Merge] For QCA6390 regression
debugging.
For QCA6390 regression debugging.
Signed-off-by: Zijun Hu <zijun_hu@...oud.com>
---
drivers/bluetooth/hci_qca.c | 17 +++++++++++++++++
1 file changed, 17 insertions(+)
diff --git a/drivers/bluetooth/hci_qca.c b/drivers/bluetooth/hci_qca.c
index ca6466676902..3ae014af7f1f 100644
--- a/drivers/bluetooth/hci_qca.c
+++ b/drivers/bluetooth/hci_qca.c
@@ -2187,9 +2187,12 @@ static void qca_power_shutdown(struct hci_uart *hu)
}
break;
+ /* what to do ? */
+#if 0
case QCA_QCA6390:
pwrseq_power_off(qcadev->bt_power->pwrseq);
break;
+#endif
default:
gpiod_set_value_cansleep(qcadev->bt_en, 0);
@@ -2418,11 +2421,25 @@ static int qca_serdev_probe(struct serdev_device *serdev)
case QCA_QCA6390:
qcadev->bt_power->pwrseq = devm_pwrseq_get(&serdev->dev,
"bluetooth");
+
+ {
+ long x_err = 0;
+ if (IS_ERR(qcadev->bt_power->pwrseq))
+ x_err = PTR_ERR(qcadev->bt_power->pwrseq);
+ dev_info(&serdev->dev, "x_err(%lu)\n", x_err);
+ if (x_err == -ENOSYS ||
+ (x_err == -ENODEV || x_err == -ENOENT)) {
+ qcadev->bt_power->pwrseq = NULL;
+ goto do_default;
+ }
+ }
+
if (IS_ERR(qcadev->bt_power->pwrseq))
return PTR_ERR(qcadev->bt_power->pwrseq);
break;
default:
+do_default:
qcadev->bt_en = devm_gpiod_get_optional(&serdev->dev, "enable",
GPIOD_OUT_LOW);
if (IS_ERR(qcadev->bt_en)) {
---
base-commit: 7a27b0ac58abccdf46e89bea9ed9f81a496132ab
change-id: 20240729-qca6390_fix-df8f6f0a5070
Best regards,
--
Zijun Hu <zijun_hu@...oud.com>
Powered by blists - more mailing lists