summaryrefslogtreecommitdiff
path: root/drivers/i3c/master/mipi-i3c-hci/hci.h
diff options
context:
space:
mode:
authorAdrian Hunter <adrian.hunter@intel.com>2026-03-06 09:24:41 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2026-03-19 16:08:48 +0100
commitd986d51a83f5c7dce0b4e8e0535e80339a2e62fc (patch)
treec3ce42759611f9ae59768d5962ddfa8553014dee /drivers/i3c/master/mipi-i3c-hci/hci.h
parent74a4f77bbf786c9cc714fb8c0fea0d0c00a79705 (diff)
i3c: mipi-i3c-hci: Consolidate spinlocks
commit fa12bb903bc3ed1826e355d267fe134bde95e23c upstream. The MIPI I3C HCI driver currently uses separate spinlocks for different contexts (PIO vs. DMA rings). This split is unnecessary and complicates upcoming fixes. The driver does not support concurrent PIO and DMA operation, and it only supports a single DMA ring, so a single lock is sufficient for all paths. Introduce a unified spinlock in struct i3c_hci, switch both PIO and DMA code to use it, and remove the per-context locks. No functional change is intended in this patch. Fixes: 9ad9a52cce282 ("i3c/master: introduce the mipi-i3c-hci driver") Cc: stable@vger.kernel.org Signed-off-by: Adrian Hunter <adrian.hunter@intel.com> Reviewed-by: Frank Li <Frank.Li@nxp.com> Link: https://patch.msgid.link/20260306072451.11131-5-adrian.hunter@intel.com Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/i3c/master/mipi-i3c-hci/hci.h')
-rw-r--r--drivers/i3c/master/mipi-i3c-hci/hci.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/i3c/master/mipi-i3c-hci/hci.h b/drivers/i3c/master/mipi-i3c-hci/hci.h
index 249ccb13c909..5656d43a1009 100644
--- a/drivers/i3c/master/mipi-i3c-hci/hci.h
+++ b/drivers/i3c/master/mipi-i3c-hci/hci.h
@@ -45,6 +45,7 @@ struct i3c_hci {
const struct hci_io_ops *io;
void *io_data;
const struct hci_cmd_ops *cmd;
+ spinlock_t lock;
atomic_t next_cmd_tid;
u32 caps;
unsigned int quirks;