* [PATCH] mmc: sunxi-mmc: Ensure host is suspended during system sleep
@ 2021-01-13 5:24 Samuel Holland
2021-01-13 9:50 ` Maxime Ripard
2021-01-13 11:32 ` Ulf Hansson
0 siblings, 2 replies; 3+ messages in thread
From: Samuel Holland @ 2021-01-13 5:24 UTC (permalink / raw)
To: Ulf Hansson, Maxime Ripard, Chen-Yu Tsai, Jernej Skrabec
Cc: linux-arm-kernel, linux-mmc, linux-kernel, Samuel Holland
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>
---
drivers/mmc/host/sunxi-mmc.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/mmc/host/sunxi-mmc.c b/drivers/mmc/host/sunxi-mmc.c
index 6310693f2ac0..cfee8db7b76d 100644
--- a/drivers/mmc/host/sunxi-mmc.c
+++ b/drivers/mmc/host/sunxi-mmc.c
@@ -1507,6 +1507,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)
--
2.26.2
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] mmc: sunxi-mmc: Ensure host is suspended during system sleep
2021-01-13 5:24 [PATCH] mmc: sunxi-mmc: Ensure host is suspended during system sleep Samuel Holland
@ 2021-01-13 9:50 ` Maxime Ripard
2021-01-13 11:32 ` Ulf Hansson
1 sibling, 0 replies; 3+ messages in thread
From: Maxime Ripard @ 2021-01-13 9:50 UTC (permalink / raw)
To: Samuel Holland
Cc: Ulf Hansson, Chen-Yu Tsai, Jernej Skrabec, linux-arm-kernel,
linux-mmc, linux-kernel
[-- Attachment #1: Type: text/plain, Size: 406 bytes --]
On Tue, Jan 12, 2021 at 11:24:21PM -0600, Samuel Holland wrote:
> 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>
Thanks!
Maxime
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] mmc: sunxi-mmc: Ensure host is suspended during system sleep
2021-01-13 5:24 [PATCH] mmc: sunxi-mmc: Ensure host is suspended during system sleep Samuel Holland
2021-01-13 9:50 ` Maxime Ripard
@ 2021-01-13 11:32 ` Ulf Hansson
1 sibling, 0 replies; 3+ messages in thread
From: Ulf Hansson @ 2021-01-13 11:32 UTC (permalink / raw)
To: Samuel Holland
Cc: Maxime Ripard, Chen-Yu Tsai, Jernej Skrabec, Linux ARM,
linux-mmc, Linux Kernel Mailing List
On Wed, 13 Jan 2021 at 06:24, Samuel Holland <samuel@sholland.org> wrote:
>
> 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>
Applied for next, thanks!
Kind regards
Uffe
> ---
> drivers/mmc/host/sunxi-mmc.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/drivers/mmc/host/sunxi-mmc.c b/drivers/mmc/host/sunxi-mmc.c
> index 6310693f2ac0..cfee8db7b76d 100644
> --- a/drivers/mmc/host/sunxi-mmc.c
> +++ b/drivers/mmc/host/sunxi-mmc.c
> @@ -1507,6 +1507,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)
> --
> 2.26.2
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-01-13 11:34 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-13 5:24 [PATCH] mmc: sunxi-mmc: Ensure host is suspended during system sleep Samuel Holland
2021-01-13 9:50 ` Maxime Ripard
2021-01-13 11:32 ` Ulf Hansson
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).