[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20260129181841.130864-4-adrian.hunter@intel.com>
Date: Thu, 29 Jan 2026 20:18:37 +0200
From: Adrian Hunter <adrian.hunter@...el.com>
To: alexandre.belloni@...tlin.com
Cc: Frank.Li@....com,
linux-i3c@...ts.infradead.org,
linux-kernel@...r.kernel.org,
linux-pm@...r.kernel.org
Subject: [PATCH 3/7] i3c: master: Mark last_busy on IBI when runtime PM is allowed
When an IBI can be received after the controller is
pm_runtime_put_autosuspend()'ed, the interrupt may occur just before the
device is auto‑suspended. In such cases, the runtime PM core may not see
any recent activity and may suspend the device earlier than intended.
Mark the controller as last busy whenever an IBI is queued (when
rpm_ibi_allowed is set) so that the auto-suspend delay correctly reflects
recent bus activity and avoids premature suspension.
Signed-off-by: Adrian Hunter <adrian.hunter@...el.com>
---
drivers/i3c/master.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/drivers/i3c/master.c b/drivers/i3c/master.c
index bcc493dc9d04..dcc07ebc50a2 100644
--- a/drivers/i3c/master.c
+++ b/drivers/i3c/master.c
@@ -2721,9 +2721,14 @@ static void i3c_master_unregister_i3c_devs(struct i3c_master_controller *master)
*/
void i3c_master_queue_ibi(struct i3c_dev_desc *dev, struct i3c_ibi_slot *slot)
{
+ struct i3c_master_controller *master = i3c_dev_get_master(dev);
+
if (!dev->ibi || !slot)
return;
+ if (master->rpm_ibi_allowed)
+ pm_runtime_mark_last_busy(master->rpm_dev);
+
atomic_inc(&dev->ibi->pending_ibis);
queue_work(dev->ibi->wq, &slot->work);
}
--
2.51.0
Powered by blists - more mailing lists