[PATCH 4/9] dmaengine: qcom: gpi: Use bus width capability helpers
Nuno Sá via B4 Relay <[email protected]> Thu, 30 Jul 2026 15:23:11 +0100
| Newsgroups | org.kernel.vger.dmaengine,org.kernel.feeds.b4-sent,org.kernel.vger.linux-iio |
|---|---|
| Message-ID | <20260730-dmaengine-support-wider-dma-masks-v1-4-3732f1f9d9ca@analog.com> |
From: Nuno Sá <[email protected]> Advertise the single supported source and destination bus width through the new dma_set_src_bus_width() and dma_set_dst_bus_width() helpers instead of assigning the legacy u32 fields directly. Signed-off-by: Nuno Sá <[email protected]> --- 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 a5055a6273af..fd45cadce91f 100644 --- a/drivers/dma/qcom/gpi.c +++ b/drivers/dma/qcom/gpi.c @@ -2265,8 +2265,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_set_src_bus_width(&gpi_dev->dma_device, + DMA_SLAVE_BUSWIDTH_8_BYTES); + if (ret) + return ret; + + ret = dma_set_dst_bus_width(&gpi_dev->dma_device, + 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.55.0