Skip to contentSkip to conversation

Bluetooth: btintel: Add *setup* function for new generation Intel controllers

PATCH Superseded Kiran K 1 participant 2 messages Oct 12, 2020 Bluetooth drivers

v6 of 7 Superseded Latest is v7 →

lore
Share & tools
lore

Kiran K

author
#0 lore raw

PATCH v6 1/2 Bluetooth: btintel: Add *setup* function for new generation Intel controllers

From: Kiran K <[email protected]>

1) add a helper function to download firmware

2) add a function to construct firmware / ddc file name

3) add a flag to identify new geneeration Intel controllers

4) define *setup* and hook it up for new genertion Intel controllers

---
Changes in v6:
* Revert to v4
* Move TyphoonPeak controller mapping to BTUSB_INTEL_NEWGEN to a separte patch

Changes in v5:
* Remove BTUSB_INTEL_NEWGEN and use usb vid/pid combination to identify controller type

Changes in v4:
* Rebase patchset
* Fix indentation issues
* make btusb_setup_intel_new_get_fw_name to return void as return value is not getting used

Changes in v3:
* Combine the two patches in v2 series to one to avoid compiler warnings reported by kernel bot (lkp)

Changed in v2:
* Fix typo in commit message

 drivers/bluetooth/btintel.h |   6 +
 drivers/bluetooth/btusb.c   | 322 +++++++++++++++++++++++++++++++++++++++++++-
 2 files changed, 327 insertions(+), 1 deletion(-)
drivers/bluetooth/btintel.h +6 -0
index 09346ae..c4e28a8 100644
@@ -132,6 +132,12 @@ struct intel_debug_features {
 	__u8    page1[16];
 } __packed;
 
+#define INTEL_HW_PLATFORM(cnvx_bt)	((u8)(((cnvx_bt) & 0x0000ff00) >> 8))
+#define INTEL_HW_VARIANT(cnvx_bt)	((u8)(((cnvx_bt) & 0x003f0000) >> 16))
+#define INTEL_CNVX_TOP_TYPE(cnvx_top)	((cnvx_top) & 0x00000fff)
+#define INTEL_CNVX_TOP_STEP(cnvx_top)	(((cnvx_top) & 0x0f000000) >> 24)
+#define INTEL_CNVX_TOP_PACK_SWAB(t, s)	__swab16(((__u16)(((t) << 4) | (s))))
+
 #if IS_ENABLED(CONFIG_BT_INTEL)
 
 int btintel_check_bdaddr(struct hci_dev *hdev);
drivers/bluetooth/btusb.c +321 -1

352 lines not on this page · raw message

Signature · 1 line
2.7.4
author
#1 lore raw

PATCH v6 2/2 Bluetooth: btusb: Map Typhoon peak controller to BTUSB_INTEL_NEWGEN

A new flag BTUSB_INTEL_NEWGEN has been defined for new generation Intel controllers. Map Typhoon peak Intel controller to BTUSB_INTEL_NEWGEN

---
 drivers/bluetooth/btusb.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/bluetooth/btusb.c +1 -1
index 1082736..5e51749 100644
@@ -366,7 +366,7 @@ static const struct usb_device_id blacklist_table[] = {
 						     BTUSB_WIDEBAND_SPEECH },
 	{ USB_DEVICE(0x8087, 0x0029), .driver_info = BTUSB_INTEL_NEW |
 						     BTUSB_WIDEBAND_SPEECH },
-	{ USB_DEVICE(0x8087, 0x0032), .driver_info = BTUSB_INTEL_NEW |
+	{ USB_DEVICE(0x8087, 0x0032), .driver_info = BTUSB_INTEL_NEWGEN |
 						     BTUSB_WIDEBAND_SPEECH},
 	{ USB_DEVICE(0x8087, 0x07da), .driver_info = BTUSB_CSR },
 	{ USB_DEVICE(0x8087, 0x07dc), .driver_info = BTUSB_INTEL },
Signature · 1 line
2.7.4