mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] Bluetooth: hci_qca: [Don't Merge] For QCA6390 regression debugging.
@ 2024-07-29 16:22 Zijun Hu
  0 siblings, 0 replies; only message in thread
From: Zijun Hu @ 2024-07-29 16:22 UTC (permalink / raw)
  To: Marcel Holtmann, Luiz Augusto von Dentz
  Cc: linux-bluetooth, linux-kernel, Zijun Hu

For QCA6390 regression debugging.

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


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2024-07-29 16:22 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-07-29 16:22 [PATCH] Bluetooth: hci_qca: [Don't Merge] For QCA6390 regression debugging Zijun Hu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®