]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
spi: spi-mem: Limit octal DTR constraints to octal DTR situations
authorMiquel Raynal <miquel.raynal@bootlin.com>
Fri, 9 Jan 2026 17:18:01 +0000 (18:18 +0100)
committerMark Brown <broonie@kernel.org>
Mon, 12 Jan 2026 12:40:30 +0000 (12:40 +0000)
commit8618271887ca10ac5108fe7e1d82ba8f1b152cf9
treeebf4c1b8a22c7b9c2241ae2a2ba3ee565880b852
parentaf4b2dc4810380a469dcd7508923b70892c2996a
spi: spi-mem: Limit octal DTR constraints to octal DTR situations

In this helper, any operation with a single DTR cycle (like 1S-1S-8D) is
considered requiring a duplicated command opcode. This is wrong as this
constraint only applies to octal DTR operations (8D-8D-8D).

Narrow the application of this constraint to the concerned bus
interface.

Note: none of the possible XD-XD-XD pattern, with X being one of {1, 2,
4} would benefit from this check either as there is only in octal DTR
mode that a single clock edge would be enough to transmit the full
opcode.

Make sure the constraint of expecting two bytes for the command is
applied to the relevant bus interface.

Reviewed-by: Tudor Ambarus <tudor.ambarus@linaro.org>
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Link: https://patch.msgid.link/20260109-winbond-v6-17-rc1-oddr-v2-3-1fff6a2ddb80@bootlin.com
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/spi/spi-mem.c