* [PATCH v3] Bluetooth: btmtksdio: Add in-band wakeup support
@ 2022-06-26 23:27 sean.wang
2022-06-26 23:59 ` [v3] " bluez.test.bot
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: sean.wang @ 2022-06-26 23:27 UTC (permalink / raw)
To: marcel, johan.hedberg
Cc: sean.wang, Soul.Huang, YN.Chen, Leon.Yen, Eric-SY.Chang,
Deren.Wu, km.lin, robin.chiu, Eddie.Chen, ch.yeh, posh.sun,
ted.huang, Eric.Liang, Stella.Chang, Tom.Chou, steve.lee, jsiuda,
frankgor, abhishekpandit, michaelfsun, mcchou, shawnku,
linux-bluetooth, linux-mediatek, linux-kernel, Yake Yang
From: Sean Wang <sean.wang@mediatek.com>
Commit ce64b3e94919 ("Bluetooth: mt7921s: Support wake on bluetooth")
adds the wake on bluethooth via a dedicated GPIO.
Extend the wake-on-bluetooth to use the SDIO DAT1 pin (in-band wakeup),
when supported by the SDIO host driver.
Co-developed-by: Yake Yang <yake.yang@mediatek.com>
Signed-off-by: Yake Yang <yake.yang@mediatek.com>
Signed-off-by: Sean Wang <sean.wang@mediatek.com>
---
v2: enhance the patch description and comments
v3: add a way suggested by the AngeloGioacchino Del Regno that look
elegant and can avoid the addition of the BTMTKSDIO_INBAND_WAKEUP
flag
---
drivers/bluetooth/btmtksdio.c | 15 +++++++++++++++
1 file changed, 15 insertions(+)
diff --git a/drivers/bluetooth/btmtksdio.c b/drivers/bluetooth/btmtksdio.c
index d6700efcfe8c..f9a3444753c2 100644
--- a/drivers/bluetooth/btmtksdio.c
+++ b/drivers/bluetooth/btmtksdio.c
@@ -1282,6 +1282,13 @@ static void btmtksdio_cmd_timeout(struct hci_dev *hdev)
hci_reset_dev(hdev);
}
+static bool btmtksdio_sdio_inband_wakeup(struct hci_dev *hdev)
+{
+ struct btmtksdio_dev *bdev = hci_get_drvdata(hdev);
+
+ return device_may_wakeup(bdev->dev);
+}
+
static bool btmtksdio_sdio_wakeup(struct hci_dev *hdev)
{
struct btmtksdio_dev *bdev = hci_get_drvdata(hdev);
@@ -1349,6 +1356,14 @@ static int btmtksdio_probe(struct sdio_func *func,
hdev->shutdown = btmtksdio_shutdown;
hdev->send = btmtksdio_send_frame;
hdev->wakeup = btmtksdio_sdio_wakeup;
+ /*
+ * If SDIO controller supports wake on Bluetooth, sending a wakeon
+ * command is not necessary.
+ */
+ if (device_can_wakeup(func->card->host->parent))
+ hdev->wakeup = btmtksdio_sdio_inband_wakeup;
+ else
+ hdev->wakeup = btmtksdio_sdio_wakeup;
hdev->set_bdaddr = btmtk_set_bdaddr;
SET_HCIDEV_DEV(hdev, &func->dev);
--
2.25.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* RE: [v3] Bluetooth: btmtksdio: Add in-band wakeup support
2022-06-26 23:27 [PATCH v3] Bluetooth: btmtksdio: Add in-band wakeup support sean.wang
@ 2022-06-26 23:59 ` bluez.test.bot
2022-06-27 12:21 ` [PATCH v3] " AngeloGioacchino Del Regno
2022-06-27 23:00 ` patchwork-bot+bluetooth
2 siblings, 0 replies; 4+ messages in thread
From: bluez.test.bot @ 2022-06-26 23:59 UTC (permalink / raw)
To: linux-bluetooth, sean.wang
[-- Attachment #1: Type: text/plain, Size: 1097 bytes --]
This is automated email and please do not reply to this email!
Dear submitter,
Thank you for submitting the patches to the linux bluetooth mailing list.
This is a CI test results with your patch series:
PW Link:https://patchwork.kernel.org/project/bluetooth/list/?series=653986
---Test result---
Test Summary:
CheckPatch PASS 1.34 seconds
GitLint PASS 0.76 seconds
SubjectPrefix PASS 0.65 seconds
BuildKernel PASS 32.11 seconds
BuildKernel32 PASS 28.16 seconds
Incremental Build with patchesPASS 38.75 seconds
TestRunner: Setup PASS 481.60 seconds
TestRunner: l2cap-tester PASS 17.44 seconds
TestRunner: bnep-tester PASS 6.14 seconds
TestRunner: mgmt-tester PASS 103.10 seconds
TestRunner: rfcomm-tester PASS 9.59 seconds
TestRunner: sco-tester PASS 9.44 seconds
TestRunner: smp-tester PASS 9.46 seconds
TestRunner: userchan-tester PASS 6.37 seconds
---
Regards,
Linux Bluetooth
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v3] Bluetooth: btmtksdio: Add in-band wakeup support
2022-06-26 23:27 [PATCH v3] Bluetooth: btmtksdio: Add in-band wakeup support sean.wang
2022-06-26 23:59 ` [v3] " bluez.test.bot
@ 2022-06-27 12:21 ` AngeloGioacchino Del Regno
2022-06-27 23:00 ` patchwork-bot+bluetooth
2 siblings, 0 replies; 4+ messages in thread
From: AngeloGioacchino Del Regno @ 2022-06-27 12:21 UTC (permalink / raw)
To: sean.wang, marcel, johan.hedberg
Cc: Soul.Huang, YN.Chen, Leon.Yen, Eric-SY.Chang, Deren.Wu, km.lin,
robin.chiu, Eddie.Chen, ch.yeh, posh.sun, ted.huang, Eric.Liang,
Stella.Chang, Tom.Chou, steve.lee, jsiuda, frankgor,
abhishekpandit, michaelfsun, mcchou, shawnku, linux-bluetooth,
linux-mediatek, linux-kernel, Yake Yang
Il 27/06/22 01:27, sean.wang@mediatek.com ha scritto:
> From: Sean Wang <sean.wang@mediatek.com>
>
> Commit ce64b3e94919 ("Bluetooth: mt7921s: Support wake on bluetooth")
> adds the wake on bluethooth via a dedicated GPIO.
>
> Extend the wake-on-bluetooth to use the SDIO DAT1 pin (in-band wakeup),
> when supported by the SDIO host driver.
>
> Co-developed-by: Yake Yang <yake.yang@mediatek.com>
> Signed-off-by: Yake Yang <yake.yang@mediatek.com>
> Signed-off-by: Sean Wang <sean.wang@mediatek.com>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v3] Bluetooth: btmtksdio: Add in-band wakeup support
2022-06-26 23:27 [PATCH v3] Bluetooth: btmtksdio: Add in-band wakeup support sean.wang
2022-06-26 23:59 ` [v3] " bluez.test.bot
2022-06-27 12:21 ` [PATCH v3] " AngeloGioacchino Del Regno
@ 2022-06-27 23:00 ` patchwork-bot+bluetooth
2 siblings, 0 replies; 4+ messages in thread
From: patchwork-bot+bluetooth @ 2022-06-27 23:00 UTC (permalink / raw)
To: Sean Wang
Cc: marcel, johan.hedberg, Soul.Huang, YN.Chen, Leon.Yen,
Eric-SY.Chang, Deren.Wu, km.lin, robin.chiu, Eddie.Chen, ch.yeh,
posh.sun, ted.huang, Eric.Liang, Stella.Chang, Tom.Chou,
steve.lee, jsiuda, frankgor, abhishekpandit, michaelfsun, mcchou,
shawnku, linux-bluetooth, linux-mediatek, linux-kernel,
yake.yang
Hello:
This patch was applied to bluetooth/bluetooth-next.git (master)
by Luiz Augusto von Dentz <luiz.von.dentz@intel.com>:
On Mon, 27 Jun 2022 07:27:36 +0800 you wrote:
> From: Sean Wang <sean.wang@mediatek.com>
>
> Commit ce64b3e94919 ("Bluetooth: mt7921s: Support wake on bluetooth")
> adds the wake on bluethooth via a dedicated GPIO.
>
> Extend the wake-on-bluetooth to use the SDIO DAT1 pin (in-band wakeup),
> when supported by the SDIO host driver.
>
> [...]
Here is the summary with links:
- [v3] Bluetooth: btmtksdio: Add in-band wakeup support
https://git.kernel.org/bluetooth/bluetooth-next/c/681ec6abcd7f
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2022-06-27 23:00 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-26 23:27 [PATCH v3] Bluetooth: btmtksdio: Add in-band wakeup support sean.wang
2022-06-26 23:59 ` [v3] " bluez.test.bot
2022-06-27 12:21 ` [PATCH v3] " AngeloGioacchino Del Regno
2022-06-27 23:00 ` patchwork-bot+bluetooth
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.