summaryrefslogtreecommitdiff
path: root/drivers/i3c
diff options
context:
space:
mode:
authorAdrian Hunter <adrian.hunter@intel.com>2026-06-16 14:37:51 +0300
committerAlexandre Belloni <alexandre.belloni@bootlin.com>2026-06-16 23:19:19 +0200
commit79ce29e100ab3de0cad66eb48d32a7de4043e2ae (patch)
treee9cabe4d652180caf4d75f6ef009a311b8d85410 /drivers/i3c
parentab5f9c5cb527c03790a92142ad368881a9100aaf (diff)
downloadlinux-next-79ce29e100ab3de0cad66eb48d32a7de4043e2ae.tar.gz
linux-next-79ce29e100ab3de0cad66eb48d32a7de4043e2ae.zip
i3c: master: Add missing runtime PM get in dev_nack_retry_count_store()
Ensure the device is runtime resumed while updating the retry configuration to avoid accessing the controller while suspended. Call i3c_master_rpm_get() before accessing the controller in dev_nack_retry_count_store() and release it with i3c_master_rpm_put() afterwards. Fixes: 990c149c61ee4 ("i3c: master: Introduce optional Runtime PM support") Signed-off-by: Adrian Hunter <adrian.hunter@intel.com> Reviewed-by: Frank Li <Frank.Li@nxp.com> Link: https://patch.msgid.link/20260616113752.196140-3-adrian.hunter@intel.com Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Diffstat (limited to 'drivers/i3c')
-rw-r--r--drivers/i3c/master.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/i3c/master.c b/drivers/i3c/master.c
index 05ea9e3c4d46..a24944047e30 100644
--- a/drivers/i3c/master.c
+++ b/drivers/i3c/master.c
@@ -767,12 +767,18 @@ static ssize_t dev_nack_retry_count_store(struct device *dev,
if (ret)
return ret;
+ ret = i3c_master_rpm_get(master);
+ if (ret)
+ return ret;
+
i3c_bus_maintenance_lock(i3cbus);
ret = master->ops->set_dev_nack_retry(master, val);
if (!ret)
master->dev_nack_retry_count = val;
i3c_bus_maintenance_unlock(i3cbus);
+ i3c_master_rpm_put(master);
+
return ret ?: count;
}