From: <sean.wang@mediatek.com>
To: <marcel@holtmann.org>, <johan.hedberg@gmail.com>
Cc: <Mark-YW.Chen@mediatek.com>, <sean.wang@mediatek.com>,
<Soul.Huang@mediatek.com>, <YN.Chen@mediatek.com>,
<Leon.Yen@mediatek.com>, <Eric-SY.Chang@mediatek.com>,
<Deren.Wu@mediatek.com>, <km.lin@mediatek.com>,
<robin.chiu@mediatek.com>, <Eddie.Chen@mediatek.com>,
<ch.yeh@mediatek.com>, <posh.sun@mediatek.com>,
<ted.huang@mediatek.com>, <Eric.Liang@mediatek.com>,
<Stella.Chang@mediatek.com>, <Tom.Chou@mediatek.com>,
<steve.lee@mediatek.com>, <jsiuda@google.com>,
<frankgor@google.com>, <abhishekpandit@google.com>,
<michaelfsun@google.com>, <mcchou@chromium.org>,
<shawnku@google.com>, <linux-bluetooth@vger.kernel.org>,
<linux-mediatek@lists.infradead.org>,
<linux-kernel@vger.kernel.org>,
Yake Yang <yake.yang@mediatek.com>
Subject: [PATCH v4 3/5] Bluetooth: mt7921s: Add .get_data_path_id
Date: Wed, 16 Mar 2022 01:54:06 +0800 [thread overview]
Message-ID: <b790033dfbaded0ccec1247200dc2bc22a7a7cac.1647366404.git.objelf@gmail.com> (raw)
In-Reply-To: <7b4627d5017be2c26ded9daf7fd297bed6614852.1647366404.git.objelf@gmail.com>
From: Yake Yang <yake.yang@mediatek.com>
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>
---
drivers/bluetooth/btmtksdio.c | 15 ++++++++++++++-
1 file changed, 14 insertions(+), 1 deletion(-)
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)
--
2.25.1
next prev parent reply other threads:[~2022-03-15 17:54 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-15 17:54 [PATCH v4 1/5] Bluetooth: btmtksdio: Fix kernel oops in btmtksdio_interrupt sean.wang
2022-03-15 17:54 ` [PATCH v4 2/5] Bluetooth: mt7921s: Set HCI_QUIRK_VALID_LE_STATES sean.wang
2022-03-15 17:54 ` sean.wang [this message]
2022-03-15 17:54 ` [PATCH v4 4/5] Bluetooth: mt7921s: Add .btmtk_get_codec_config_data sean.wang
2022-03-15 17:54 ` [PATCH v4 5/5] Bluetooth: mt7921s: Add WBS support sean.wang
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=b790033dfbaded0ccec1247200dc2bc22a7a7cac.1647366404.git.objelf@gmail.com \
--to=sean.wang@mediatek.com \
--cc=Deren.Wu@mediatek.com \
--cc=Eddie.Chen@mediatek.com \
--cc=Eric-SY.Chang@mediatek.com \
--cc=Eric.Liang@mediatek.com \
--cc=Leon.Yen@mediatek.com \
--cc=Mark-YW.Chen@mediatek.com \
--cc=Soul.Huang@mediatek.com \
--cc=Stella.Chang@mediatek.com \
--cc=Tom.Chou@mediatek.com \
--cc=YN.Chen@mediatek.com \
--cc=abhishekpandit@google.com \
--cc=ch.yeh@mediatek.com \
--cc=frankgor@google.com \
--cc=johan.hedberg@gmail.com \
--cc=jsiuda@google.com \
--cc=km.lin@mediatek.com \
--cc=linux-bluetooth@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mediatek@lists.infradead.org \
--cc=marcel@holtmann.org \
--cc=mcchou@chromium.org \
--cc=michaelfsun@google.com \
--cc=posh.sun@mediatek.com \
--cc=robin.chiu@mediatek.com \
--cc=shawnku@google.com \
--cc=steve.lee@mediatek.com \
--cc=ted.huang@mediatek.com \
--cc=yake.yang@mediatek.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;
as well as URLs for NNTP newsgroup(s).