]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
i3c: mipi-i3c-hci-pci: Add optional ability to manage child runtime PM
authorAdrian Hunter <adrian.hunter@intel.com>
Fri, 6 Mar 2026 08:53:37 +0000 (10:53 +0200)
committerAlexandre Belloni <alexandre.belloni@bootlin.com>
Sun, 12 Apr 2026 14:32:46 +0000 (16:32 +0200)
commite813e7e300863b6c5777792291a03e054115c551
treef6cccd5fe3de9c4e0807e73a2e6f90a13053a2ab
parent82851828a8b19b207d9e547c759ee1195f8cd140
i3c: mipi-i3c-hci-pci: Add optional ability to manage child runtime PM

Some platforms implement the MIPI I3C HCI Multi-Bus Instance capability,
where a single parent device hosts multiple I3C controller instances.  In
such designs, the parent - not the individual child instances - may need to
coordinate runtime PM so that all controllers runtime PM callbacks are
invoked in a controlled and synchronized manner.

For example, if the parent enables IBI-wakeup when transitioning into a
low-power state, every bus instance must remain able to receive IBIs up
until that point.  This requires deferring the individual controllers'
runtime suspend callbacks (which disable bus activity) until the parent
decides it is safe for all instances to suspend together.

To support this usage model:

  * Add runtime PM and system PM callbacks in the PCI driver to invoke
    the mipi-i3c-hci driver's runtime PM callbacks for each instance.

  * Introduce a driver-data flag, control_instance_pm, which opts into
    the new parent-managed PM behaviour.

  * Ensure the callbacks are only used when the corresponding instance is
    operational at suspend time.  This is reliable because the operational
    state cannot change while the parent device is undergoing a PM
    transition, and PCI always performs a runtime resume before system
    suspend on current configurations, so that suspend and resume alternate
    irrespective of whether it is runtime or system PM.

By that means, parent-managed runtime PM coordination for multi-instance
MIPI I3C HCI PCI devices is provided without altering existing behaviour on
platforms that do not require it.

Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
Reviewed-by: Frank Li <Frank.Li@nxp.com>
Link: https://patch.msgid.link/20260306085338.62955-5-adrian.hunter@intel.com
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
drivers/i3c/master/mipi-i3c-hci/mipi-i3c-hci-pci.c