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

Frank Li Frank.li at nxp.com
Tue Nov 25 07:41:12 PST 2025


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 at nxp.com>
>
> Signed-off-by: Carlos Song <carlos.song at nxp.com>
> ---
>  drivers/spi/spi-imx.c | 164 +++++++++++++++++++++++-------------------
>  1 file changed, 92 insertions(+), 72 deletions(-)
>
...
>
>  	return 0;
>  /* fallback to pio */
> --
> 2.34.1
>



More information about the linux-arm-kernel mailing list