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

Jarkko Nikula jarkko.nikula at linux.intel.com
Wed Sep 20 22:56:53 PDT 2023


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 at linux.intel.com>
---
 drivers/i3c/master.c | 4 ++++
 1 file changed, 4 insertions(+)

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;
-- 
2.40.1




More information about the linux-i3c mailing list