summaryrefslogtreecommitdiff
path: root/lib/mpi/mpi-internal.h
diff options
context:
space:
mode:
authorVijay Viswanath <vviswana@codeaurora.org>2017-12-21 15:33:33 +0530
committerVijay Viswanath <vviswana@codeaurora.org>2018-01-10 12:27:13 +0530
commita4d62a190d53e4be5aac2eb225c05e0d9105e8ea (patch)
treef5777b25db6b209cf8b913cedc9593d2ee08bed5 /lib/mpi/mpi-internal.h
parent55cc722ec6725f7547071a396606f6a04b9a75e8 (diff)
mmc: host: Add device_prepare pm for mmc_host
mmc_host is a virtual device and it doesn't have any pm ops and so during pm registration of device, no_pm_callback gets set as true. The mmc_host device is not runtime enabled as it is a virtual device and mmc_host is the parent device of mmc_card. As the mmc_host is runtime disabled, mmc_card can runtime suspend/resume without depending on state of mmc_host during normal operations. During system suspend, the direct_complete flag of mmc_host device gets set as it has no pm_ops. When mmc_card successfully suspends, it clears the direct_complete flag of its parent (mmc_host). But in certain cases during dpm_suspend, an async error can occur after suspend work for mmc_card is scheduled and before it gets executed. In that case, mmc_card suspend work will not clear the direct_complete flag of mmc_host. When mmc_host suspend comes after that of mmc_card, it too will skip all actions. But by this time, the mmc_host device has been added to device_suspended list. So during resume, mmc_host resume will do dpm resume of mmc_host. In dpm_resume, all devices which has direct_complete flag set will be runtime_enabled. This is because, in dpm_suspend, any device with direct_complete flag will be runtime_disabled. Thus, mmc_host which has direct_complete flag set, will get runtime enabled during dpm_resume. This is a problem in pm framework with direct_complete flag (runtime enabling a device in resume when it was not runtime disabled in suspend path). Now that mmc_host device is runtime enabled, to runtime resume the mmc_card, the pm framework will try to runtime resume the mmc_host device as well and will fail. This prevents mmc_card from runtime resuming after a runtime_suspend. Fix this by adding a dummy suspend_prepare() fn for mmc_host. This prevents the direct_complete flag of mmc_host device from getting set. Change-Id: Ib739399027958d17e418e0240684b0b517a02941 Signed-off-by: Vijay Viswanath <vviswana@codeaurora.org>
Diffstat (limited to 'lib/mpi/mpi-internal.h')
0 files changed, 0 insertions, 0 deletions