[PATCH v5 4/9] dmaengine: qcom: gpi: Use bus width capability helpers

From: Nuno Sá

Date: Fri Oct 09 2026 - 11:54:46 EST


Advertise the single supported source and destination bus width through
the new dma_bus_width_set() helper
instead of assigning the legacy u32 fields directly.

Reviewed-by: Frank Li <Frank.Li@xxxxxxx>
Signed-off-by: Nuno Sá <nuno.sa@xxxxxxxxxx>
---
drivers/dma/qcom/gpi.c | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)

diff --git a/drivers/dma/qcom/gpi.c b/drivers/dma/qcom/gpi.c
index c41bfac65ddf..1959ff8d1b3c 100644
--- a/drivers/dma/qcom/gpi.c
+++ b/drivers/dma/qcom/gpi.c
@@ -2270,8 +2270,15 @@ static int gpi_probe(struct platform_device *pdev)
/* configure dmaengine apis */
gpi_dev->dma_device.directions = BIT(DMA_DEV_TO_MEM) | BIT(DMA_MEM_TO_DEV);
gpi_dev->dma_device.residue_granularity = DMA_RESIDUE_GRANULARITY_DESCRIPTOR;
- gpi_dev->dma_device.src_addr_widths = DMA_SLAVE_BUSWIDTH_8_BYTES;
- gpi_dev->dma_device.dst_addr_widths = DMA_SLAVE_BUSWIDTH_8_BYTES;
+ ret = dma_bus_width_set(gpi_dev->dma_device.src_bus_widths,
+ DMA_SLAVE_BUSWIDTH_8_BYTES);
+ if (ret)
+ return ret;
+
+ ret = dma_bus_width_set(gpi_dev->dma_device.dst_bus_widths,
+ DMA_SLAVE_BUSWIDTH_8_BYTES);
+ if (ret)
+ return ret;
gpi_dev->dma_device.device_alloc_chan_resources = gpi_alloc_chan_resources;
gpi_dev->dma_device.device_free_chan_resources = gpi_free_chan_resources;
gpi_dev->dma_device.device_tx_status = dma_cookie_status;

--
2.56.0