Commit 561ae1d4 authored by Sean Wang's avatar Sean Wang Committed by Marcel Holtmann
Browse files

Bluetooth: btmtksdio: fix resume failure



btmtksdio have to rely on MMC_PM_KEEP_POWER in pm_flags to avoid that
SDIO power is being shut off during the device is in suspend. That fixes
the SDIO command fails to access the bus after the device is resumed.

Fixes: 7f3c563c ("Bluetooth: btmtksdio: Add runtime PM support to SDIO based Bluetooth")
Co-developed-by: default avatarMark-yw Chen <mark-yw.chen@mediatek.com>
Signed-off-by: default avatarMark-yw Chen <mark-yw.chen@mediatek.com>
Signed-off-by: default avatarSean Wang <sean.wang@mediatek.com>
Signed-off-by: default avatarMarcel Holtmann <marcel@holtmann.org>
parent 4b4b2228
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -1065,6 +1065,8 @@ static int btmtksdio_runtime_suspend(struct device *dev)
	if (!test_bit(BTMTKSDIO_FUNC_ENABLED, &bdev->tx_state))
		return 0;

	sdio_set_host_pm_flags(func, MMC_PM_KEEP_POWER);

	sdio_claim_host(bdev->func);

	sdio_writel(bdev->func, C_FW_OWN_REQ_SET, MTK_REG_CHLPCR, &err);