summaryrefslogtreecommitdiffstats
path: root/drivers/bluetooth
diff options
context:
space:
mode:
authorYake Yang <yake.yang@mediatek.com>2022-03-17 00:15:21 +0100
committerMarcel Holtmann <marcel@holtmann.org>2022-03-18 17:12:08 +0100
commitd786105ef25c0c7640daffc10bcf6d6fcfa0d0e1 (patch)
tree537e874305fa88abb7cc6d6d4d2fcd42c567e9f9 /drivers/bluetooth
parentBluetooth: mt7921s: Set HCI_QUIRK_VALID_LE_STATES (diff)
downloadlinux-d786105ef25c0c7640daffc10bcf6d6fcfa0d0e1.tar.xz
linux-d786105ef25c0c7640daffc10bcf6d6fcfa0d0e1.zip
Bluetooth: mt7921s: Add .get_data_path_id
Add .get_data_path_id to fetch data_path_id for MT7921 to support HFP offload use case. This is a preliminary patch to add the WBS support to the MT7921 driver. Reviewed-by: Mark Chen <markyawenchen@gmail.com> Co-developed-by: Sean Wang <sean.wang@mediatek.com> Signed-off-by: Sean Wang <sean.wang@mediatek.com> Signed-off-by: Yake Yang <yake.yang@mediatek.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Diffstat (limited to 'drivers/bluetooth')
-rw-r--r--drivers/bluetooth/btmtksdio.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/drivers/bluetooth/btmtksdio.c b/drivers/bluetooth/btmtksdio.c
index 034e55278c56..4000a994fe2c 100644
--- a/drivers/bluetooth/btmtksdio.c
+++ b/drivers/bluetooth/btmtksdio.c
@@ -936,6 +936,13 @@ static int btmtksdio_mtk_reg_write(struct hci_dev *hdev, u32 reg, u32 val, u32 m
return err;
}
+static int btmtksdio_get_data_path_id(struct hci_dev *hdev, __u8 *data_path_id)
+{
+ /* uses 1 as data path id for all the usecases */
+ *data_path_id = 1;
+ return 0;
+}
+
static int btmtksdio_sco_setting(struct hci_dev *hdev)
{
const struct btmtk_sco sco_setting = {
@@ -968,7 +975,13 @@ static int btmtksdio_sco_setting(struct hci_dev *hdev)
return err;
val |= 0x00000101;
- return btmtksdio_mtk_reg_write(hdev, MT7921_PINMUX_1, val, ~0);
+ err = btmtksdio_mtk_reg_write(hdev, MT7921_PINMUX_1, val, ~0);
+ if (err < 0)
+ return err;
+
+ hdev->get_data_path_id = btmtksdio_get_data_path_id;
+
+ return err;
}
static int btmtksdio_reset_setting(struct hci_dev *hdev)