Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit ed2a9785 authored by Ohad Ben-Cohen's avatar Ohad Ben-Cohen Committed by Chris Ball
Browse files

mmc: sdio: support suspend/resume while runtime suspended



Bring SDIO devices back to full power before their suspend
handler is invoked.

Doing so ensures that SDIO suspend/resume semantics are
maintained (drivers still get to decide whether their
card should be removed or kept during system suspend,
and at what power state), and that SDIO suspend/resume
execution paths are unchanged.

This is achieved by resuming a runtime-suspended SDIO device
in its ->prepare() PM callback (similary to the PCI subsystem).

Since the PM core always increments the run-time usage
counter before calling the ->prepare() callback and decrements
it after calling the ->complete() callback, it is guaranteed
that when the system will come out of suspend, our device's
power state will reflect its runtime PM usage counter.

Signed-off-by: default avatarOhad Ben-Cohen <ohad@wizery.com>
Tested-by: default avatarLuciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: default avatarChris Ball <cjb@laptop.org>
parent 87973ba2
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment