[PATCH] Bluetooth: hci_qca: [Don't Merge] For QCA6390 regression debugging.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



For QCA6390 regression debugging.

Signed-off-by: Zijun Hu <zijun_hu@xxxxxxxxxx>
---
 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@xxxxxxxxxx>





[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux