diff mbox series

[01/12] i3c: master: Inherit DMA masks and parameters from parent device

Message ID 20230921055704.1087277-2-jarkko.nikula@linux.intel.com (mailing list archive)
State Accepted
Headers show
Series i3c: mipi-i3c-hci: Enabling fixes | expand

Commit Message

Jarkko Nikula Sept. 21, 2023, 5:56 a.m. UTC
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>
---
 drivers/i3c/master.c | 4 ++++
 1 file changed, 4 insertions(+)
diff mbox series

Patch

diff --git a/drivers/i3c/master.c b/drivers/i3c/master.c
index 87283e4a4607..401380c17156 100644
--- a/drivers/i3c/master.c
+++ b/drivers/i3c/master.c
@@ -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;