mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 10:41:38 -04:00
mmc: core: Introduce MMC_CAP_SYNC_RUNTIME_PM
To allow mmc host drivers to inform the mmc core about rather using pm_runtime_put_sync_suspend() instead of pm_runtime_put_autosuspend(), let's introduce MMC_CAP_SYNC_RUNTIME_PM. This is especially useful for those mmc host drivers that don't benefit from using the runtime PM autosuspend feature. Typically this is those that relies on parent devices to power the card via runtime PM, like some USB host drivers for example. Signed-off-by: Ulf Hansson <[email protected]> Tested-by: Kai-Heng Feng <[email protected]> Tested-by: Oleksandr Natalenko <[email protected]>
This commit is contained in:
parent
a89e7bcb18
commit
7d5ef51257
2 changed files with 5 additions and 2 deletions
|
|
@ -887,7 +887,10 @@ void mmc_release_host(struct mmc_host *host)
|
|||
spin_unlock_irqrestore(&host->lock, flags);
|
||||
wake_up(&host->wq);
|
||||
pm_runtime_mark_last_busy(mmc_dev(host));
|
||||
pm_runtime_put_autosuspend(mmc_dev(host));
|
||||
if (host->caps & MMC_CAP_SYNC_RUNTIME_PM)
|
||||
pm_runtime_put_sync_suspend(mmc_dev(host));
|
||||
else
|
||||
pm_runtime_put_autosuspend(mmc_dev(host));
|
||||
}
|
||||
}
|
||||
EXPORT_SYMBOL(mmc_release_host);
|
||||
|
|
|
|||
Loading…
Reference in a new issue