Skip to content

Commit 0c35691

Browse files
jhnikulaalexandrebelloni
authored andcommitted
i3c: master: Inherit DMA masks and parameters from parent device
Copy the DMA masks and parameters for an I3C master device from parent device so that the master device has them set for the DMA buffer and mapping API. Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com> Link: https://lore.kernel.org/r/20230921055704.1087277-2-jarkko.nikula@linux.intel.com Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
1 parent a8b163e commit 0c35691

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

drivers/i3c/master.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2629,6 +2629,10 @@ int i3c_master_register(struct i3c_master_controller *master,
26292629
device_initialize(&master->dev);
26302630
dev_set_name(&master->dev, "i3c-%d", i3cbus->id);
26312631

2632+
master->dev.dma_mask = parent->dma_mask;
2633+
master->dev.coherent_dma_mask = parent->coherent_dma_mask;
2634+
master->dev.dma_parms = parent->dma_parms;
2635+
26322636
ret = of_populate_i3c_bus(master);
26332637
if (ret)
26342638
goto err_put_dev;

0 commit comments

Comments
 (0)