summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamuel Holland <samuel@sholland.org>2021-01-12 23:24:21 -0600
committerUlf Hansson <ulf.hansson@linaro.org>2021-02-01 11:54:45 +0100
commit3882917da8c3a0ce67b052d94e7f591bcb5275a0 (patch)
tree11926711a4cb540ae754f4ef6578c916a09937a2
parent7214d79237df4d4e3b40e5c1763698e21393da16 (diff)
mmc: sunxi-mmc: Ensure host is suspended during system sleep
If the device suspend process begins before the mmc host's autosuspend timeout, the host will continue running during system sleep. Avoid this by forcing runtime suspend during a global suspend transition. Signed-off-by: Samuel Holland <samuel@sholland.org> Acked-by: Maxime Ripard <mripard@kernel.org> Link: https://lore.kernel.org/r/20210113052421.36553-1-samuel@sholland.org Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
-rw-r--r--drivers/mmc/host/sunxi-mmc.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/mmc/host/sunxi-mmc.c b/drivers/mmc/host/sunxi-mmc.c
index e46bb4e404a8..2702736a1c57 100644
--- a/drivers/mmc/host/sunxi-mmc.c
+++ b/drivers/mmc/host/sunxi-mmc.c
@@ -1529,6 +1529,8 @@ static int sunxi_mmc_runtime_suspend(struct device *dev)
#endif
static const struct dev_pm_ops sunxi_mmc_pm_ops = {
+ SET_SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend,
+ pm_runtime_force_resume)
SET_RUNTIME_PM_OPS(sunxi_mmc_runtime_suspend,
sunxi_mmc_runtime_resume,
NULL)