public inbox for linux-pm@vger.kernel.org
 help / color / mirror / Atom feed
From: Adrian Hunter <adrian.hunter@intel.com>
To: "Rafael J. Wysocki" <rafael.j.wysocki@intel.com>
Cc: <alexandre.belloni@bootlin.com>, <linux-i3c@lists.infradead.org>,
	<linux-kernel@vger.kernel.org>, <linux-pm@vger.kernel.org>,
	Frank Li <Frank.li@nxp.com>
Subject: Re: [PATCH 5/7] i3c: mipi-i3c-hci: Allow parent to manage runtime PM
Date: Tue, 3 Feb 2026 14:54:44 +0200	[thread overview]
Message-ID: <eb335daa-ab6b-4cff-bea2-90160892bc8f@intel.com> (raw)
In-Reply-To: <aYDP847mgleQBF5Y@lizhi-Precision-Tower-5810>

+ Rafael

Rafael, this is not at all urgent, but when you have time
please have a look at this patch set.  There is also some
more explanation below.  Is it acceptable?  Is there a
better way?

On 02/02/2026 18:25, Frank Li wrote:
> 
> Does your device Hierarchy look like
> 
>            PCI device
>                |
>        -----------------
>       HCI1            HCI2
>        |               |
>      I3C M1          I3C M2

Yes and no.  There is only 1 real device : the PCI device.
It implements the MIPI I3C HCI standard which allows multiple
I3C bus controllers in one device (in our case 2 controllers).

The PCI driver mipi-i3c-hci-pci creates 2 platform devices,
one for each controller.  The platform driver is mipi-i3c-hci:

 Driver                        Device                     Bus

 mipi-i3c-hci-pci            0000:00:11.1                 PCI
                            /            \
 mipi-i3c-hci      intel-lpss-i3c.0  intel-lpss-i3c.1     Platform

LPSS I3C also supports wake-up from in-band interrupt (IBI) via
PCI PME.  The PME only works when the PCI device is in a low power
state (D3hot in our case).  Also the PME is effectively shared by
the 2 controllers i.e. an IBI signal (the controller's SDA line
pulled low) for either controller will cause the PME.

That means there are only 2 valid configurations:

	1: Both controllers enabled to receive IBIs
		PCI device	D0
		Controller 1	Enabled
		Controller 2	Enabled

	2: Both controllers disabled to enable PME wakeup
		PCI device	D3hot
		Controller 1	Disabled
		Controller 2	Disabled

However, represented as platform devices, the 2 controllers
runtime suspend and resume independently from each other.
Whereas they effectively need to runtime suspend (or resume)
at the same time.

The proposed solution is for the PCI driver mipi-i3c-hci-pci
to take over managing runtime PM for both controllers, calling
into mipi-i3c-hci when it is safe to do so, to save/restore state
and disable/enable the controllers one after the other.

Current situation (I3C next branch):

	PCI device	Runtime PM enabled, dependent on child devices
			PCI subsystem controls PCI device power state

	Controller 1	Runtime PM enabled plus auto-suspend
			I3C subsystem runtime PM gets/puts the Platform device
			Runtime suspend: disable and save state
			Runtime resume: restore state and enable

	Controller 2	Runtime PM enabled plus auto-suspend
			I3C subsystem runtime PM gets/puts the Platform device
			Runtime suspend: disable and save state
			Runtime resume: restore state and enable

Proposed (this patch set):

	PCI device	Runtime PM enabled plus auto-suspend
			I3C subsystem runtime PM gets/puts the PCI device
			For each controller:
				Call into mipi-i3c-hci (when it is safe)
					Runtime suspend: disable and save state
					Runtime resume: restore state and enable

	Controller 1	Runtime PM disabled

	Controller 2	Runtime PM disabled

> 
> 
> You want HCI1 and HCI2 suspened only when both HCI1 and HCI2 can enter RM
> time suspend status?
> 
> Device Link can link two devices, but not sure if it can handle cyclic
> case, HCI1 and HCI2 depend each other.
> 
> Or you create common power domain for HCI1 and HCI2, in power domain to
> handle suspend.
> 
> It'd better ask run time pm owner to provide better suggestion.

Ok


  reply	other threads:[~2026-02-03 12:54 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-01-29 18:18 [PATCH 0/7] i3c: mipi-i3c-hci-pci: Enable IBI while runtime suspended for Intel controllers Adrian Hunter
2026-01-29 18:18 ` [PATCH 1/7] i3c: mipi-i3c-hci-pci: Set d3hot_delay to 0 " Adrian Hunter
2026-01-29 19:43   ` Frank Li
2026-01-29 18:18 ` [PATCH 2/7] i3c: master: Allow controller drivers to select runtime PM device Adrian Hunter
2026-01-29 18:18 ` [PATCH 3/7] i3c: master: Mark last_busy on IBI when runtime PM is allowed Adrian Hunter
2026-01-29 19:56   ` Frank Li
2026-01-29 20:42     ` Adrian Hunter
2026-01-29 20:55       ` Frank Li
2026-01-30  7:48         ` Adrian Hunter
2026-01-29 18:18 ` [PATCH 4/7] i3c: mipi-i3c-hci: Add quirk to allow IBI while runtime suspended Adrian Hunter
2026-01-29 18:18 ` [PATCH 5/7] i3c: mipi-i3c-hci: Allow parent to manage runtime PM Adrian Hunter
2026-01-29 20:00   ` Frank Li
2026-01-29 20:28     ` Adrian Hunter
2026-01-29 21:00       ` Frank Li
2026-01-30  7:00         ` Adrian Hunter
2026-01-30 15:04           ` Frank Li
2026-01-30 16:34             ` Adrian Hunter
2026-01-30 17:11               ` Frank Li
2026-02-02 16:25               ` Frank Li
2026-02-03 12:54                 ` Adrian Hunter [this message]
2026-02-03 15:59                   ` Frank Li
2026-02-03 16:22                     ` Wysocki, Rafael J
2026-02-03 16:57                       ` Adrian Hunter
2026-02-03 20:20                         ` Rafael J. Wysocki
2026-01-29 18:18 ` [PATCH 6/7] i3c: mipi-i3c-hci-pci: Add optional ability to manage child " Adrian Hunter
2026-01-29 18:18 ` [PATCH 7/7] i3c: mipi-i3c-hci-pci: Enable IBI while runtime suspended for Intel controllers Adrian Hunter

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=eb335daa-ab6b-4cff-bea2-90160892bc8f@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.j.wysocki@intel.com \
    /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