public inbox for linux-pm@vger.kernel.org
 help / color / mirror / Atom feed
From: Adrian Hunter <adrian.hunter@intel.com>
To: Frank Li <Frank.li@nxp.com>
Cc: <alexandre.belloni@bootlin.com>, <rafael@kernel.org>,
	<linux-i3c@lists.infradead.org>, <linux-kernel@vger.kernel.org>,
	<linux-pm@vger.kernel.org>
Subject: Re: [PATCH V2 5/6] i3c: mipi-i3c-hci-pci: Add optional ability to manage child runtime PM
Date: Wed, 4 Feb 2026 20:27:54 +0200	[thread overview]
Message-ID: <8dfd167b-246f-446c-bd86-ea9de95e445c@intel.com> (raw)
In-Reply-To: <aYNumA0-FvE-g7nl@lizhi-Precision-Tower-5810>

On 04/02/2026 18:06, Frank Li wrote:
> On Wed, Feb 04, 2026 at 01:15:10PM +0200, Adrian Hunter wrote:
>> 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>
>> ---
> ...
>> +
>> +static int mipi_i3c_hci_pci_suspend(struct device *dev)
>> +{
>> +	struct mipi_i3c_hci_pci *hci = dev_get_drvdata(dev);
>> +	struct mipi_i3c_hci_pci_pm_data pm_data = {};
>> +	int ret;
>> +
>> +	if (!hci->info->control_instance_pm)
>> +		return 0;
>> +
>> +	ret = device_for_each_child_reverse(dev, &pm_data, mipi_i3c_hci_pci_suspend_instance);
>> +	if (ret) {
>> +		if (ret == -EAGAIN || ret == -EBUSY)
>> +			pm_runtime_mark_last_busy(&hci->pci->dev);
> 
> This should not neccessary, the runtime suspend API already call it now.

In face it is not necessary because the driver is no longer using
auto-suspend.  I will take it out.


  parent reply	other threads:[~2026-02-04 18:28 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-02-04 11:15 [PATCH V2 0/6] i3c: mipi-i3c-hci-pci: Enable IBI while runtime suspended for Intel controllers Adrian Hunter
2026-02-04 11:15 ` [PATCH V2 1/6] i3c: mipi-i3c-hci-pci: Set d3hot_delay to 0 " Adrian Hunter
2026-02-04 11:15 ` [PATCH V2 2/6] i3c: master: Mark last_busy on IBI when runtime PM is allowed Adrian Hunter
2026-02-04 16:10   ` Frank Li
2026-02-04 18:24     ` Adrian Hunter
2026-02-04 21:45       ` Frank Li
2026-02-05  6:43         ` Adrian Hunter
2026-02-04 11:15 ` [PATCH V2 3/6] i3c: mipi-i3c-hci: Add quirk to allow IBI while runtime suspended Adrian Hunter
2026-02-04 15:54   ` Frank Li
2026-02-04 11:15 ` [PATCH V2 4/6] i3c: mipi-i3c-hci: Allow parent to manage runtime PM Adrian Hunter
2026-02-04 11:15 ` [PATCH V2 5/6] i3c: mipi-i3c-hci-pci: Add optional ability to manage child " Adrian Hunter
2026-02-04 16:06   ` Frank Li
2026-02-04 16:16     ` Rafael J. Wysocki
2026-02-04 18:27     ` Adrian Hunter [this message]
2026-02-04 11:15 ` [PATCH V2 6/6] i3c: mipi-i3c-hci-pci: Enable IBI while runtime suspended for Intel controllers Adrian Hunter
2026-02-04 16:07   ` Frank Li

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8dfd167b-246f-446c-bd86-ea9de95e445c@intel.com \
    --to=adrian.hunter@intel.com \
    --cc=Frank.li@nxp.com \
    --cc=alexandre.belloni@bootlin.com \
    --cc=linux-i3c@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=rafael@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox