Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

i3c: mipi-i3c-hci: Add DMA suspend and resume support

Introduce helper functions to suspend and resume DMA operations. These
are required to prepare for upcoming Runtime PM support, ensuring that
DMA state is properly managed during power transitions.

Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
Reviewed-by: Frank Li <Frank.Li@nxp.com>
Link: https://patch.msgid.link/20260113072702.16268-12-adrian.hunter@intel.com
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>

authored by

Adrian Hunter and committed by
Alexandre Belloni
81695872 f5401c97

+27
+25
drivers/i3c/master/mipi-i3c-hci/dma.c
··· 275 275 hci_dma_init_rh(hci, &rings->headers[i], i); 276 276 } 277 277 278 + static void hci_dma_suspend(struct i3c_hci *hci) 279 + { 280 + struct hci_rings_data *rings = hci->io_data; 281 + int n = rings ? rings->total : 0; 282 + 283 + for (int i = 0; i < n; i++) { 284 + struct hci_rh_data *rh = &rings->headers[i]; 285 + 286 + rh_reg_write(INTR_SIGNAL_ENABLE, 0); 287 + rh_reg_write(RING_CONTROL, 0); 288 + } 289 + 290 + i3c_hci_sync_irq_inactive(hci); 291 + } 292 + 293 + static void hci_dma_resume(struct i3c_hci *hci) 294 + { 295 + struct hci_rings_data *rings = hci->io_data; 296 + 297 + if (rings) 298 + hci_dma_init_rings(hci); 299 + } 300 + 278 301 static int hci_dma_init(struct i3c_hci *hci) 279 302 { 280 303 struct hci_rings_data *rings; ··· 888 865 .request_ibi = hci_dma_request_ibi, 889 866 .free_ibi = hci_dma_free_ibi, 890 867 .recycle_ibi_slot = hci_dma_recycle_ibi_slot, 868 + .suspend = hci_dma_suspend, 869 + .resume = hci_dma_resume, 891 870 };
+2
drivers/i3c/master/mipi-i3c-hci/hci.h
··· 125 125 struct i3c_ibi_slot *slot); 126 126 int (*init)(struct i3c_hci *hci); 127 127 void (*cleanup)(struct i3c_hci *hci); 128 + void (*suspend)(struct i3c_hci *hci); 129 + void (*resume)(struct i3c_hci *hci); 128 130 }; 129 131 130 132 extern const struct hci_io_ops mipi_i3c_hci_pio;