mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Tim Jiang <quic_tjiang@quicinc.com>
To: <johan@kernel.org>
Cc: <marcel@holtmann.org>, <luiz.dentz@gmail.com>,
	<johan.hedberg@gmail.com>, <linux-kernel@vger.kernel.org>,
	<linux-bluetooth@vger.kernel.org>,
	<linux-arm-msm@vger.kernel.org>, <quic_tjiang@quicinc.com>,
	<quic_bgodavar@quicinc.com>, <quic_hemantg@quicinc.com>
Subject: [PATCH v14 1/2] Bluetooth: hci_qca: adjust qca btsoc type print expression
Date: Thu, 27 Jul 2023 16:35:54 +0800	[thread overview]
Message-ID: <20230727083555.1023992-2-quic_tjiang@quicinc.com> (raw)
In-Reply-To: <20230727083555.1023992-1-quic_tjiang@quicinc.com>

This patch make the print btsoc type expression more clearly.

Signed-off-by: Tim Jiang <quic_tjiang@quicinc.com>
---
 drivers/bluetooth/hci_qca.c | 31 +++++++++++++++++++++++++++----
 1 file changed, 27 insertions(+), 4 deletions(-)

diff --git a/drivers/bluetooth/hci_qca.c b/drivers/bluetooth/hci_qca.c
index 9b785c947d96..e11d47210e80 100644
--- a/drivers/bluetooth/hci_qca.c
+++ b/drivers/bluetooth/hci_qca.c
@@ -1748,6 +1748,7 @@ static int qca_setup(struct hci_uart *hu)
 	const char *firmware_name = qca_get_firmware_name(hu);
 	int ret;
 	struct qca_btsoc_version ver;
+	const char *soc_name;
 
 	ret = qca_check_speeds(hu);
 	if (ret)
@@ -1762,10 +1763,32 @@ static int qca_setup(struct hci_uart *hu)
 	 */
 	set_bit(HCI_QUIRK_SIMULTANEOUS_DISCOVERY, &hdev->quirks);
 
-	bt_dev_info(hdev, "setting up %s",
-		qca_is_wcn399x(soc_type) ? "wcn399x" :
-		(soc_type == QCA_WCN6750) ? "wcn6750" :
-		(soc_type == QCA_WCN6855) ? "wcn6855" : "ROME/QCA6390");
+	switch (soc_type) {
+	case QCA_AR3002:
+		soc_name = "ar300x";
+		break;
+	case QCA_ROME:
+		soc_name = "ROME";
+		break;
+	case QCA_QCA6390:
+		soc_name = "QCA6390";
+		break;
+	case QCA_WCN3990:
+	case QCA_WCN3991:
+	case QCA_WCN3998:
+		soc_name = "wcn399x";
+		break;
+	case QCA_WCN6750:
+		soc_name = "wcn6750";
+		break;
+	case QCA_WCN6855:
+		soc_name = "wcn6855";
+		break;
+	default:
+		soc_name = "unknown soc";
+		break;
+	}
+	bt_dev_info(hdev, "setting up %s", soc_name);
 
 	qca->memdump_state = QCA_MEMDUMP_IDLE;
 
-- 
2.41.0


  reply	other threads:[~2023-07-27  9:05 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-27  8:35 [PATCH v14 0/2] Bluetooth: hci_qca: Add support for Qualcomm Bluetooth SoC QCA2066 Tim Jiang
2023-07-27  8:35 ` Tim Jiang [this message]
2023-07-27  8:35 ` [PATCH v14 2/2] " Tim Jiang
2023-08-30  3:17   ` Tim Jiang
2023-08-02  8:01 ` [PATCH v14 0/2] " Tim Jiang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230727083555.1023992-2-quic_tjiang@quicinc.com \
    --to=quic_tjiang@quicinc.com \
    --cc=johan.hedberg@gmail.com \
    --cc=johan@kernel.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-bluetooth@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=luiz.dentz@gmail.com \
    --cc=marcel@holtmann.org \
    --cc=quic_bgodavar@quicinc.com \
    --cc=quic_hemantg@quicinc.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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®