mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-11 13:27:06 +09:00
bus: mhi: host: pci_generic: Add missing poweroff() PM callback
commite64d5fa504upstream. During hibernation process, once thaw() stage completes, the MHI endpoint devices will be in M0 state post recovery. After that, the devices will be powered down so that the system can enter the target sleep state. During this stage, the PCI core will put the devices in D3hot. But this transition is allowed by the MHI spec. The devices can only enter D3hot when it is in M3 state. So for fixing this issue, let's add the poweroff() callback that will get executed before putting the system in target sleep state during hibernation. This callback will power down the device properly so that it could be restored during restore() or thaw() stage. Cc: stable@vger.kernel.org Fixes:5f0c2ee1fe("bus: mhi: pci-generic: Fix hibernation") Reported-by: Hemant Kumar <quic_hemantk@quicinc.com> Suggested-by: Hemant Kumar <quic_hemantk@quicinc.com> Link: https://lore.kernel.org/r/20220405125907.5644-1-manivannan.sadhasivam@linaro.org Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
732f861dd4
commit
b3d21deabc
@@ -1045,6 +1045,7 @@ static const struct dev_pm_ops mhi_pci_pm_ops = {
|
||||
.resume = mhi_pci_resume,
|
||||
.freeze = mhi_pci_freeze,
|
||||
.thaw = mhi_pci_restore,
|
||||
.poweroff = mhi_pci_freeze,
|
||||
.restore = mhi_pci_restore,
|
||||
#endif
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user