mirror of
https://github.com/torvalds/linux.git
synced 2026-11-07 06:17:02 +01:00
i3c: mipi-i3c-hci: Move DMA suspend/resume callbacks
Relocate hci_dma_suspend() and hci_dma_resume() closer to the DMA IO operations table in preparation for upcoming changes. No functional change. Signed-off-by: Adrian Hunter <adrian.hunter@intel.com> Reviewed-by: Frank Li <Frank.Li@nxp.com> Link: https://patch.msgid.link/20260920151248.46936-11-adrian.hunter@intel.com Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
This commit is contained in:
parent
5fbd0790af
commit
ae307311a6
|
|
@ -273,29 +273,6 @@ static void hci_dma_init_rings(struct i3c_hci *hci)
|
|||
hci_dma_init_rh(hci, &rings->headers[i], i);
|
||||
}
|
||||
|
||||
static void hci_dma_suspend(struct i3c_hci *hci)
|
||||
{
|
||||
struct hci_rings_data *rings = hci->io_data;
|
||||
int n = rings ? rings->total : 0;
|
||||
|
||||
for (int i = 0; i < n; i++) {
|
||||
struct hci_rh_data *rh = &rings->headers[i];
|
||||
|
||||
rh_reg_write(INTR_SIGNAL_ENABLE, 0);
|
||||
rh_reg_write(RING_CONTROL, 0);
|
||||
}
|
||||
|
||||
i3c_hci_sync_irq_inactive(hci);
|
||||
}
|
||||
|
||||
static void hci_dma_resume(struct i3c_hci *hci)
|
||||
{
|
||||
struct hci_rings_data *rings = hci->io_data;
|
||||
|
||||
if (rings)
|
||||
hci_dma_init_rings(hci);
|
||||
}
|
||||
|
||||
static int hci_dma_init(struct i3c_hci *hci)
|
||||
{
|
||||
struct hci_rings_data *rings;
|
||||
|
|
@ -1075,6 +1052,29 @@ static bool hci_dma_irq_handler(struct i3c_hci *hci)
|
|||
return handled;
|
||||
}
|
||||
|
||||
static void hci_dma_suspend(struct i3c_hci *hci)
|
||||
{
|
||||
struct hci_rings_data *rings = hci->io_data;
|
||||
int n = rings ? rings->total : 0;
|
||||
|
||||
for (int i = 0; i < n; i++) {
|
||||
struct hci_rh_data *rh = &rings->headers[i];
|
||||
|
||||
rh_reg_write(INTR_SIGNAL_ENABLE, 0);
|
||||
rh_reg_write(RING_CONTROL, 0);
|
||||
}
|
||||
|
||||
i3c_hci_sync_irq_inactive(hci);
|
||||
}
|
||||
|
||||
static void hci_dma_resume(struct i3c_hci *hci)
|
||||
{
|
||||
struct hci_rings_data *rings = hci->io_data;
|
||||
|
||||
if (rings)
|
||||
hci_dma_init_rings(hci);
|
||||
}
|
||||
|
||||
const struct hci_io_ops mipi_i3c_hci_dma = {
|
||||
.init = hci_dma_init,
|
||||
.cleanup = hci_dma_cleanup,
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user