The current MHI runtime PM design is flawed, as the MHI core attempts to manage power references internally via mhi_queue() and related paths. This is problematic because the controller drivers do not have the knowledge of the client PM status due to the broken PM topology. So when they runtime suspend the controller, the client drivers could no longer function.
To address this, in the new design, the client drivers reports their own runtime PM status now and the PM framework makes sure that the parent (controller driver) and other components up in the chain remain active. This leverages the standard parent-child PM relationship. Since MHI creates a mhi_dev device without an associated driver, we explicitly enable runtime PM on it and mark it with pm_runtime_no_callbacks() to indicate the PM core that no callbacks exist for this device. This is only needed for MHI controller, since the controller driver uses the bus device just like PCI device. NOTE: As we have dependecies with other subsystems, Mani can you take these series through MHI tree if other maintainers give a ack for this series. To all the maintainers please ack to this series after reviewing so that Mani can take this through MHI branch. Signed-off-by: Krishna Chaitanya Chundru <[email protected]> --- Krishna Chaitanya Chundru (4): bus: mhi: Replace controller runtime_get/put callbacks with direct PM runtime APIs bus: mhi: Remove runtime PM callback ops from controller interface net: mhi_net: Implement runtime PM support bus: mhi: Fix broken runtime PM design drivers/accel/qaic/mhi_controller.c | 11 ----------- drivers/bus/mhi/host/init.c | 1 - drivers/bus/mhi/host/internal.h | 7 +++++-- drivers/bus/mhi/host/main.c | 23 ++++------------------- drivers/bus/mhi/host/pci_generic.c | 24 +++--------------------- drivers/bus/mhi/host/pm.c | 18 ++++++++---------- drivers/net/mhi_net.c | 13 +++++++++++++ drivers/net/wireless/ath/ath11k/mhi.c | 10 ---------- drivers/net/wireless/ath/ath12k/mhi.c | 11 ----------- include/linux/mhi.h | 4 ---- 10 files changed, 33 insertions(+), 89 deletions(-) --- base-commit: ac3fd01e4c1efce8f2c054cdeb2ddd2fc0fb150d change-id: 20251128-mhi_runtimepm-f7aed52cc557 Best regards, -- Krishna Chaitanya Chundru <[email protected]>
