mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] mmc: sdhci-sprd: disable polling scan for sdio card
@ 2022-12-19  8:47 Wenchao Chen
  2022-12-19 10:36 ` Adrian Hunter
  0 siblings, 1 reply; 2+ messages in thread
From: Wenchao Chen @ 2022-12-19  8:47 UTC (permalink / raw)
  To: adrian.hunter, ulf.hansson, orsonzhai, baolin.wang, zhang.lyra
  Cc: linux-mmc, linux-kernel, zhenxiong.lai, yuelin.tang, wenchao.chen666

Enable polling will increase the power consumption of the host.

Fixes: fb8bd90f83c4 ("mmc: sdhci-sprd: Add Spreadtrum's initial host controller")
Signed-off-by: Wenchao Chen <wenchao.chen@unisoc.com>
---
 drivers/mmc/host/sdhci-sprd.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/mmc/host/sdhci-sprd.c b/drivers/mmc/host/sdhci-sprd.c
index 525f979e2a97..113a5c77578f 100644
--- a/drivers/mmc/host/sdhci-sprd.c
+++ b/drivers/mmc/host/sdhci-sprd.c
@@ -696,6 +696,10 @@ static int sdhci_sprd_probe(struct platform_device *pdev)
 	if (ret)
 		goto err_cleanup_host;
 
+	if ((host->mmc->caps2 & MMC_CAP2_NO_SD) &&
+			(host->mmc->caps2 & MMC_CAP2_NO_MMC))
+		host->mmc->caps &= ~MMC_CAP_NEEDS_POLL;
+
 	pm_runtime_mark_last_busy(&pdev->dev);
 	pm_runtime_put_autosuspend(&pdev->dev);
 
-- 
2.17.1


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-12-19 10:36 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-12-19  8:47 [PATCH] mmc: sdhci-sprd: disable polling scan for sdio card Wenchao Chen
2022-12-19 10:36 ` Adrian Hunter

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®