Skip to content

Commit 79982e8

Browse files
committed
Merge tag 'for-net-next-2024-05-14' of git://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth-next
Luiz Augusto von Dentz says: ==================== bluetooth-next pull request for net-next: - Add support MediaTek MT7921S SDIO - Various fixes for -Wflex-array-member-not-at-end and -Wfamnae - Add USB HW IDs for MT7921/MT7922/MT7925 - Add support for Intel BlazarI and Filmore Peak2 (BE201) - Add initial support for Intel PCIe driver - Remove HCI_AMP support * tag 'for-net-next-2024-05-14' of git://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth-next: (47 commits) Bluetooth: btintel_pcie: Refactor and code cleanup Bluetooth: btintel_pcie: Fix warning reported by sparse Bluetooth: hci_core: Fix not handling hdev->le_num_of_adv_sets=1 Bluetooth: btintel: Fix compiler warning for multi_v7_defconfig config Bluetooth: btintel_pcie: Fix compiler warnings Bluetooth: btintel_pcie: Add *setup* function to download firmware Bluetooth: btintel_pcie: Add support for PCIe transport Bluetooth: btintel: Export few static functions Bluetooth: HCI: Remove HCI_AMP support Bluetooth: L2CAP: Fix div-by-zero in l2cap_le_flowctl_init() Bluetooth: qca: Fix error code in qca_read_fw_build_info() Bluetooth: hci_conn: Use __counted_by() and avoid -Wfamnae warning Bluetooth: btintel: Add support for Filmore Peak2 (BE201) Bluetooth: btintel: Add support for BlazarI LE Create Connection command timeout increased to 20 secs dt-bindings: net: bluetooth: Add MediaTek MT7921S SDIO Bluetooth Bluetooth: compute LE flow credits based on recvbuf space Bluetooth: hci_sync: Use cmd->num_cis instead of magic number Bluetooth: hci_conn: Use struct_size() in hci_le_big_create_sync() Bluetooth: qca: clean up defines ... ==================== Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
2 parents 5c16727 + 6a486c1 commit 79982e8

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+2651
-1141
lines changed
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
2+
%YAML 1.2
3+
---
4+
$id: http://devicetree.org/schemas/net/bluetooth/mediatek,mt7921s-bluetooth.yaml#
5+
$schema: http://devicetree.org/meta-schemas/core.yaml#
6+
7+
title: MediaTek MT7921S Bluetooth
8+
9+
maintainers:
10+
- Sean Wang <[email protected]>
11+
12+
description:
13+
MT7921S is an SDIO-attached dual-radio WiFi+Bluetooth Combo chip; each
14+
function is its own SDIO function on a shared SDIO interface. The chip
15+
has two dedicated reset lines, one for each function core.
16+
This binding only covers the Bluetooth SDIO function, with one device
17+
node describing only this SDIO function.
18+
19+
allOf:
20+
- $ref: bluetooth-controller.yaml#
21+
22+
properties:
23+
compatible:
24+
enum:
25+
- mediatek,mt7921s-bluetooth
26+
27+
reg:
28+
const: 2
29+
30+
reset-gpios:
31+
maxItems: 1
32+
description:
33+
An active-low reset line for the Bluetooth core; on typical M.2
34+
key E modules this is the W_DISABLE2# pin.
35+
36+
required:
37+
- compatible
38+
- reg
39+
40+
unevaluatedProperties: false
41+
42+
examples:
43+
- |
44+
#include <dt-bindings/gpio/gpio.h>
45+
46+
mmc {
47+
#address-cells = <1>;
48+
#size-cells = <0>;
49+
50+
bluetooth@2 {
51+
compatible = "mediatek,mt7921s-bluetooth";
52+
reg = <2>;
53+
reset-gpios = <&pio 8 GPIO_ACTIVE_LOW>;
54+
};
55+
};

Documentation/devicetree/bindings/net/broadcom-bluetooth.yaml

Lines changed: 19 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -14,20 +14,25 @@ description:
1414

1515
properties:
1616
compatible:
17-
enum:
18-
- brcm,bcm20702a1
19-
- brcm,bcm4329-bt
20-
- brcm,bcm4330-bt
21-
- brcm,bcm4334-bt
22-
- brcm,bcm43430a0-bt
23-
- brcm,bcm43430a1-bt
24-
- brcm,bcm43438-bt
25-
- brcm,bcm4345c5
26-
- brcm,bcm43540-bt
27-
- brcm,bcm4335a0
28-
- brcm,bcm4349-bt
29-
- cypress,cyw4373a0-bt
30-
- infineon,cyw55572-bt
17+
oneOf:
18+
- items:
19+
- enum:
20+
- infineon,cyw43439-bt
21+
- const: brcm,bcm4329-bt
22+
- enum:
23+
- brcm,bcm20702a1
24+
- brcm,bcm4329-bt
25+
- brcm,bcm4330-bt
26+
- brcm,bcm4334-bt
27+
- brcm,bcm43430a0-bt
28+
- brcm,bcm43430a1-bt
29+
- brcm,bcm43438-bt
30+
- brcm,bcm4345c5
31+
- brcm,bcm43540-bt
32+
- brcm,bcm4335a0
33+
- brcm,bcm4349-bt
34+
- cypress,cyw4373a0-bt
35+
- infineon,cyw55572-bt
3136

3237
shutdown-gpios:
3338
maxItems: 1

MAINTAINERS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13763,6 +13763,7 @@ M: Sean Wang <[email protected]>
1376313763
1376413764
L: [email protected] (moderated for non-subscribers)
1376513765
S: Maintained
13766+
F: Documentation/devicetree/bindings/net/bluetooth/mediatek,mt7921s-bluetooth.yaml
1376613767
F: Documentation/devicetree/bindings/net/mediatek-bluetooth.txt
1376713768
F: drivers/bluetooth/btmtkuart.c
1376813769

drivers/bluetooth/Kconfig

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -478,5 +478,16 @@ config BT_NXPUART
478478
Say Y here to compile support for NXP Bluetooth UART device into
479479
the kernel, or say M here to compile as a module (btnxpuart).
480480

481+
config BT_INTEL_PCIE
482+
tristate "Intel HCI PCIe driver"
483+
depends on PCI
484+
select BT_INTEL
485+
select FW_LOADER
486+
help
487+
Intel Bluetooth transport driver for PCIe.
488+
This driver is required if you want to use Intel Bluetooth device
489+
with PCIe interface.
481490

491+
Say Y here to compiler support for Intel Bluetooth PCIe device into
492+
the kernel or say M to compile it as module (btintel_pcie)
482493
endmenu

drivers/bluetooth/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ obj-$(CONFIG_BT_HCIBTUSB) += btusb.o
1717
obj-$(CONFIG_BT_HCIBTSDIO) += btsdio.o
1818

1919
obj-$(CONFIG_BT_INTEL) += btintel.o
20+
obj-$(CONFIG_BT_INTEL_PCIE) += btintel_pcie.o btintel.o
2021
obj-$(CONFIG_BT_ATH3K) += ath3k.o
2122
obj-$(CONFIG_BT_MRVL) += btmrvl.o
2223
obj-$(CONFIG_BT_MRVL_SDIO) += btmrvl_sdio.o

drivers/bluetooth/ath3k.c

Lines changed: 11 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
* Copyright (c) 2008-2009 Atheros Communications Inc.
44
*/
55

6-
76
#include <linux/module.h>
87
#include <linux/kernel.h>
98
#include <linux/init.h>
@@ -128,7 +127,6 @@ MODULE_DEVICE_TABLE(usb, ath3k_table);
128127
* for AR3012
129128
*/
130129
static const struct usb_device_id ath3k_blist_tbl[] = {
131-
132130
/* Atheros AR3012 with sflash firmware*/
133131
{ USB_DEVICE(0x0489, 0xe04e), .driver_info = BTUSB_ATH3012 },
134132
{ USB_DEVICE(0x0489, 0xe04d), .driver_info = BTUSB_ATH3012 },
@@ -202,7 +200,7 @@ static inline void ath3k_log_failed_loading(int err, int len, int size,
202200
#define TIMEGAP_USEC_MAX 100
203201

204202
static int ath3k_load_firmware(struct usb_device *udev,
205-
const struct firmware *firmware)
203+
const struct firmware *firmware)
206204
{
207205
u8 *send_buf;
208206
int len = 0;
@@ -237,9 +235,9 @@ static int ath3k_load_firmware(struct usb_device *udev,
237235
memcpy(send_buf, firmware->data + sent, size);
238236

239237
err = usb_bulk_msg(udev, pipe, send_buf, size,
240-
&len, 3000);
238+
&len, 3000);
241239

242-
if (err || (len != size)) {
240+
if (err || len != size) {
243241
ath3k_log_failed_loading(err, len, size, count);
244242
goto error;
245243
}
@@ -262,7 +260,7 @@ static int ath3k_get_state(struct usb_device *udev, unsigned char *state)
262260
}
263261

264262
static int ath3k_get_version(struct usb_device *udev,
265-
struct ath3k_version *version)
263+
struct ath3k_version *version)
266264
{
267265
return usb_control_msg_recv(udev, 0, ATH3K_GETVERSION,
268266
USB_TYPE_VENDOR | USB_DIR_IN, 0, 0,
@@ -271,7 +269,7 @@ static int ath3k_get_version(struct usb_device *udev,
271269
}
272270

273271
static int ath3k_load_fwfile(struct usb_device *udev,
274-
const struct firmware *firmware)
272+
const struct firmware *firmware)
275273
{
276274
u8 *send_buf;
277275
int len = 0;
@@ -310,8 +308,8 @@ static int ath3k_load_fwfile(struct usb_device *udev,
310308
memcpy(send_buf, firmware->data + sent, size);
311309

312310
err = usb_bulk_msg(udev, pipe, send_buf, size,
313-
&len, 3000);
314-
if (err || (len != size)) {
311+
&len, 3000);
312+
if (err || len != size) {
315313
ath3k_log_failed_loading(err, len, size, count);
316314
kfree(send_buf);
317315
return err;
@@ -425,7 +423,6 @@ static int ath3k_load_syscfg(struct usb_device *udev)
425423
}
426424

427425
switch (fw_version.ref_clock) {
428-
429426
case ATH3K_XTAL_FREQ_26M:
430427
clk_value = 26;
431428
break;
@@ -441,7 +438,7 @@ static int ath3k_load_syscfg(struct usb_device *udev)
441438
}
442439

443440
snprintf(filename, ATH3K_NAME_LEN, "ar3k/ramps_0x%08x_%d%s",
444-
le32_to_cpu(fw_version.rom_version), clk_value, ".dfu");
441+
le32_to_cpu(fw_version.rom_version), clk_value, ".dfu");
445442

446443
ret = request_firmware(&firmware, filename, &udev->dev);
447444
if (ret < 0) {
@@ -456,7 +453,7 @@ static int ath3k_load_syscfg(struct usb_device *udev)
456453
}
457454

458455
static int ath3k_probe(struct usb_interface *intf,
459-
const struct usb_device_id *id)
456+
const struct usb_device_id *id)
460457
{
461458
const struct firmware *firmware;
462459
struct usb_device *udev = interface_to_usbdev(intf);
@@ -505,10 +502,10 @@ static int ath3k_probe(struct usb_interface *intf,
505502
if (ret < 0) {
506503
if (ret == -ENOENT)
507504
BT_ERR("Firmware file \"%s\" not found",
508-
ATH3K_FIRMWARE);
505+
ATH3K_FIRMWARE);
509506
else
510507
BT_ERR("Firmware file \"%s\" request failed (err=%d)",
511-
ATH3K_FIRMWARE, ret);
508+
ATH3K_FIRMWARE, ret);
512509
return ret;
513510
}
514511

0 commit comments

Comments
 (0)