Re: [PATCH 5/6] spi: add rx and tx lane mask to spi_transfer struct

From: Andy Shevchenko

Date: Tue Jul 14 2026 - 05:30:50 EST


On Tue, Jul 14, 2026 at 02:56:46AM -0300, Jonathan Santos wrote:
> In SPI_MULTI_LANE_MODE_STRIPE mode, a transfer currently activates all
> available lanes, but some use cases require operating over a subset of
> lanes per transfer.
>
> Enable dynamic lane selection for tx and rx by adding new fields to the
> spi_transfer struct. Controllers that support multi-lane selection must
> parse the transfer struct to update the rx and tx mask lane-wise.
>
> Peripherals need to set values to the new fields only if multi_lane_mode
> is set to SPI_MULTI_LANE_MODE_STRIPE and they need to enable at least one
> lane, not necessary for enabling all lanes.

Same comment as per previous patch, check very carefully the layout.
Run `pahole`, count the bits, think about BE architectures. This might
lead to unnecessary gaps or even more units to place all bits.

--
With Best Regards,
Andy Shevchenko