Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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>

authored by

Yake Yang and committed by
Marcel Holtmann
d786105e 546ff98e

+14 -1
+14 -1
drivers/bluetooth/btmtksdio.c
··· 936 936 return err; 937 937 } 938 938 939 + static int btmtksdio_get_data_path_id(struct hci_dev *hdev, __u8 *data_path_id) 940 + { 941 + /* uses 1 as data path id for all the usecases */ 942 + *data_path_id = 1; 943 + return 0; 944 + } 945 + 939 946 static int btmtksdio_sco_setting(struct hci_dev *hdev) 940 947 { 941 948 const struct btmtk_sco sco_setting = { ··· 975 968 return err; 976 969 977 970 val |= 0x00000101; 978 - return btmtksdio_mtk_reg_write(hdev, MT7921_PINMUX_1, val, ~0); 971 + err = btmtksdio_mtk_reg_write(hdev, MT7921_PINMUX_1, val, ~0); 972 + if (err < 0) 973 + return err; 974 + 975 + hdev->get_data_path_id = btmtksdio_get_data_path_id; 976 + 977 + return err; 979 978 } 980 979 981 980 static int btmtksdio_reset_setting(struct hci_dev *hdev)