Re: [PATCH 2/6] spi: imx: introduce helper to clear DMA mode logic

From: Frank Li
Date: Tue Nov 25 2025 - 10:41:32 EST


On Tue, Nov 25, 2025 at 06:06:14PM +0800, Carlos Song wrote:
> Add a helper function to handle clearing DMA mode, including getting the
> maximum watermark length and submitting the DMA request. This refactoring
> makes the code more concise and improves readability.
> No functional changes.

spi: imx: introduce helper functions to improve readability

Add helper functions spi_imx_dma_submit() and spi_imx_dma_max_wml_find() to
improve readability and prepare to add more complex logic for dynamic burst
length calculation.

No functional changes.

Reviewed-by: Frank Li <Frank.Li@xxxxxxx>
>
> Signed-off-by: Carlos Song <carlos.song@xxxxxxx>
> ---
> drivers/spi/spi-imx.c | 164 +++++++++++++++++++++++-------------------
> 1 file changed, 92 insertions(+), 72 deletions(-)
>
...
>
> return 0;
> /* fallback to pio */
> --
> 2.34.1
>