aboutsummaryrefslogtreecommitdiff
path: root/drivers/i3c
diff options
context:
space:
mode:
authorGravatar Jarkko Nikula <jarkko.nikula@linux.intel.com> 2023-09-21 08:56:53 +0300
committerGravatar Alexandre Belloni <alexandre.belloni@bootlin.com> 2023-09-25 23:35:14 +0200
commit0c35691551387e060e6ae7a6652b4101270c73cf (patch)
tree42891b59ac023a9c87f72d0383e4067da42d2c61 /drivers/i3c
parenti3c: svc: Annotate struct svc_i3c_xfer with __counted_by (diff)
downloadlinux-0c35691551387e060e6ae7a6652b4101270c73cf.tar.gz
linux-0c35691551387e060e6ae7a6652b4101270c73cf.tar.bz2
linux-0c35691551387e060e6ae7a6652b4101270c73cf.zip
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>
Diffstat (limited to 'drivers/i3c')
-rw-r--r--drivers/i3c/master.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/i3c/master.c b/drivers/i3c/master.c
index 8573ca507708..839eb8b4bbde 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;