]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
i3c: mipi-i3c-hci-pci: Enable IBI while runtime suspended for Intel controllers
authorAdrian Hunter <adrian.hunter@intel.com>
Fri, 6 Mar 2026 08:53:38 +0000 (10:53 +0200)
committerAlexandre Belloni <alexandre.belloni@bootlin.com>
Sun, 12 Apr 2026 14:32:46 +0000 (16:32 +0200)
Intel LPSS I3C controllers can wake from runtime suspend to receive
in-band interrupts (IBIs), and they also implement the MIPI I3C HCI
Multi-Bus Instance capability.  When multiple I3C bus instances share the
same PCI wakeup, the PCI parent must coordinate runtime PM so that all
instances suspend together and their mipi-i3c-hci runtime suspend
callbacks are invoked in a consistent manner.

Enable IBI-based wakeup by setting HCI_QUIRK_RPM_IBI_ALLOWED for the
intel-lpss-i3c platform device.  Also set HCI_QUIRK_RPM_PARENT_MANAGED so
that the mipi-i3c-hci core driver expects runtime PM to be controlled by
the PCI parent rather than by individual instances.  For all Intel HCI PCI
configurations, enable the corresponding control_instance_pm flag in the
PCI driver.

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

index d803c0b7a64e4d2b23fc7b26a76f3f5b8a1dbba4..b781dbed21650065ad3174f0fa2a1bcc85bb3933 100644 (file)
@@ -1042,7 +1042,9 @@ static const struct acpi_device_id i3c_hci_acpi_match[] = {
 MODULE_DEVICE_TABLE(acpi, i3c_hci_acpi_match);
 
 static const struct platform_device_id i3c_hci_driver_ids[] = {
-       { .name = "intel-lpss-i3c", HCI_QUIRK_RPM_ALLOWED },
+       { .name = "intel-lpss-i3c", HCI_QUIRK_RPM_ALLOWED |
+                                   HCI_QUIRK_RPM_IBI_ALLOWED |
+                                   HCI_QUIRK_RPM_PARENT_MANAGED },
        { /* sentinel */ }
 };
 MODULE_DEVICE_TABLE(platform, i3c_hci_driver_ids);
index d29c4c789a19f3b47ae3a01880f00a7e23978869..9468786fb853c117317e28db0f3bee970c2d905d 100644 (file)
@@ -200,6 +200,7 @@ static const struct mipi_i3c_hci_pci_info intel_mi_1_info = {
        .id = {0, 1},
        .instance_offset = {0, 0x400},
        .instance_count = 2,
+       .control_instance_pm = true,
 };
 
 static const struct mipi_i3c_hci_pci_info intel_mi_2_info = {
@@ -209,6 +210,7 @@ static const struct mipi_i3c_hci_pci_info intel_mi_2_info = {
        .id = {2, 3},
        .instance_offset = {0, 0x400},
        .instance_count = 2,
+       .control_instance_pm = true,
 };
 
 static const struct mipi_i3c_hci_pci_info intel_si_2_info = {
@@ -218,6 +220,7 @@ static const struct mipi_i3c_hci_pci_info intel_si_2_info = {
        .id = {2},
        .instance_offset = {0},
        .instance_count = 1,
+       .control_instance_pm = true,
 };
 
 static int mipi_i3c_hci_pci_find_instance(struct mipi_i3c_hci_pci *hci, struct device *dev)