Re: [PATCH RFC 02/16] spi: spi-mem: Stop checking the dummy buswidth against board wiring

From: Bough Chen

Date: Fri Nov 27 2026 - 03:49:17 EST


On Wed, Nov 25, 2026 at 06:51:16PM +0100, Miquel Raynal wrote:
> The dummy phase does not transfer any data. Its buswidth only describes
> the pin state during the dummy cycles, so it must not be validated
> against the board's Tx/Rx wiring.
>
> Drop that check (the sanity check in spi_mem_check_op() stays).
>
> Suggested-by: Pratyush Yadav <pratyush@xxxxxxxxxx>
> Link: https://lore.kernel.org/linux-mtd/20241112075242.174010-1-linchengming884@xxxxxxxxx/T/#m7cc1a5055702f5a42a8f3949c968842d845914d7
> Signed-off-by: Miquel Raynal <miquel.raynal@xxxxxxxxxxx>
> ---
> This is not really a fix, so no fixes/cc:stable is on purpose.
> ---
> drivers/spi/spi-mem.c | 7 ++++---
> 1 file changed, 4 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/spi/spi-mem.c b/drivers/spi/spi-mem.c
> index c64e906ba919..9b8b8f2b3387 100644
> --- a/drivers/spi/spi-mem.c
> +++ b/drivers/spi/spi-mem.c
> @@ -152,9 +152,10 @@ static bool spi_mem_check_buswidth(struct spi_mem *mem,
> spi_check_buswidth_req(mem, op->addr.buswidth, true))
> return false;
>
> - if (op->dummy.nbytes &&
> - spi_check_buswidth_req(mem, op->dummy.buswidth, true))
> - return false;
> + /*
> + * The dummy phase implies no actual transmission nor reception.
> + * Its buswidth therefore does not matter much.
> + */
>
Hi Miquel,

With this change, do you plan to add the linked patch back?
Setting the dummy buswidth to match the data buswidth is more reasonable.

Regards
Haibo Chen
> if (op->data.dir != SPI_MEM_NO_DATA &&
> spi_check_buswidth_req(mem, op->data.buswidth,
>
> --
> 2.56.0
>