Skip to content

Commit

Permalink
i3c: master: Inherit DMA masks and parameters from parent device
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
jhnikula authored and alexandrebelloni committed Sep 25, 2023
1 parent a8b163e commit 0c35691
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions drivers/i3c/master.c
Original file line number Diff line number Diff line change
Expand Up @@ -2629,6 +2629,10 @@ int i3c_master_register(struct i3c_master_controller *master,
device_initialize(&master->dev);
dev_set_name(&master->dev, "i3c-%d", i3cbus->id);

master->dev.dma_mask = parent->dma_mask;
master->dev.coherent_dma_mask = parent->coherent_dma_mask;
master->dev.dma_parms = parent->dma_parms;

ret = of_populate_i3c_bus(master);
if (ret)
goto err_put_dev;
Expand Down

0 comments on commit 0c35691

Please sign in to comment.