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

Frank Li <[email protected]> Thu, 30 Jul 2026 14:25:05 -0500
Newsgroups org.kernel.vger.dmaengine,org.kernel.vger.linux-iio
Message-ID <amulES1UetwSfWJ_@SMW015318>
On Thu, Jul 30, 2026 at 03:23:11PM +0100, Nuno Sá via B4 Relay wrote:
> [You don't often get email from [email protected]. Learn why this is important at https://aka.ms/LearnAboutSenderIdentification ]
>
> 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]>
> ---

Reviewed-by: Frank Li <[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
>
>