Skip to content

Commit 5fe77a6

Browse files
ahunter6alexandrebelloni
authored andcommitted
i3c: mipi-i3c-hci: Add quirk to allow IBI while runtime suspended
Some I3C controllers can be automatically runtime-resumed in order to handle in-band interrupts (IBIs), meaning that runtime suspend does not need to be blocked when IBIs are enabled. For example, a PCI-attached controller in a low-power state may generate a Power Management Event (PME) when the SDA line is pulled low to signal the START condition of an IBI. The PCI subsystem will then runtime-resume the device, allowing the IBI to be received without requiring the controller to remain active. Introduce a new quirk, HCI_QUIRK_RPM_IBI_ALLOWED, so that drivers can opt-in to this capability via driver data. Signed-off-by: Adrian Hunter <adrian.hunter@intel.com> Reviewed-by: Frank Li <Frank.Li@nxp.com> Link: https://patch.msgid.link/20260306085338.62955-3-adrian.hunter@intel.com Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
1 parent 815b444 commit 5fe77a6

2 files changed

Lines changed: 4 additions & 0 deletions

File tree

drivers/i3c/master/mipi-i3c-hci/core.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -996,6 +996,9 @@ static int i3c_hci_probe(struct platform_device *pdev)
996996
if (hci->quirks & HCI_QUIRK_RPM_ALLOWED)
997997
i3c_hci_rpm_enable(&pdev->dev);
998998

999+
if (hci->quirks & HCI_QUIRK_RPM_IBI_ALLOWED)
1000+
hci->master.rpm_ibi_allowed = true;
1001+
9991002
return i3c_master_register(&hci->master, &pdev->dev, &i3c_hci_ops, false);
10001003
}
10011004

drivers/i3c/master/mipi-i3c-hci/hci.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,7 @@ struct i3c_hci_dev_data {
150150
#define HCI_QUIRK_OD_PP_TIMING BIT(3) /* Set OD and PP timings for AMD platforms */
151151
#define HCI_QUIRK_RESP_BUF_THLD BIT(4) /* Set resp buf thld to 0 for AMD platforms */
152152
#define HCI_QUIRK_RPM_ALLOWED BIT(5) /* Runtime PM allowed */
153+
#define HCI_QUIRK_RPM_IBI_ALLOWED BIT(6) /* IBI and Hot-Join allowed while runtime suspended */
153154

154155
/* global functions */
155156
void mipi_i3c_hci_resume(struct i3c_hci *hci);

0 commit comments

Comments
 (0)