bus: mhi: pci_generic: Add support for runtime PM
authorLoic Poulain <loic.poulain@linaro.org>
Fri, 5 Mar 2021 19:16:48 +0000 (20:16 +0100)
committerManivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Wed, 10 Mar 2021 14:41:22 +0000 (20:11 +0530)
commitd3800c1dce24c7964f37663b3a5549e93f345a5c
treedf169a93387666af885e4f30cc680a234fe33724
parente89878aa4b79a834d5c90abb96efcd64396c2163
bus: mhi: pci_generic: Add support for runtime PM

When the device is idle it is possible to move it into the lowest MHI
PM state (M3). In that mode, all MHI operations are suspended and the
PCI device can be safely put into PCI D3 state.

The device is then resumed from D3/M3 either because of host initiated
MHI operation (e.g. buffer TX) or because the device (modem) has
triggered wake-up via PME feature (e.g. on incoming data).

Same procedures can be used for system wide or runtime suspend/resume.

Signed-off-by: Loic Poulain <loic.poulain@linaro.org>
Reviewed-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Link: https://lore.kernel.org/r/1614971808-22156-6-git-send-email-loic.poulain@linaro.org
Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
drivers/bus/mhi/pci_generic.c