mmc: core: add deferred resume support
This patch enables the deferred resume support which would
prevent initialization of the card each time the system resumes.
With this change, the resume process would only be initiated if
a request is received.
Following scenario can occur:
1. device runtime suspended, system suspend is triggered
When resumed, the device would not be resumed until a
request is received.
2. device is runtime active, system suspend is triggered
When resumed, the device would be marked as BUS_NEEDS_RESUME
and actual resume would happen, when a request is received.
At this point, the device may also enter runtime-suspend or
system suspend may also occur. In both the cases, since the
device has not been resumed, it won't be suspended again.
However, the platform device would be runtime suspended
and resumed as before.
It can so happen that the card is removed even before a
request is received. In this case the device would be
resumed and card would be removed from core layer and
upper layers would be notified.
In case of SDIO cards, this change would not have any effect
since manual resume would be enabled for devices supporting
a block read/write commands.
CRs-Fixed: 561382
Change-Id: Id39befea109ee24864dfde0898395b972d0a1b3a
Signed-off-by: Asutosh Das <asutoshd@codeaurora.org>
2 files changed