mirror of
https://github.com/torvalds/linux.git
synced 2026-05-25 15:41:52 +02:00
spi: axi-spi-engine: don't emit XFER_BITS for empty xfer
This adds a check on xfer->len to avoid emitting an XFER_BITS instruction for empty transfers in the AXI SPI Engine driver. This avoids unnecessary delays caused by executing an instruction that has no effect on the actual SPI transfer. Signed-off-by: David Lechner <dlechner@baylibre.com> Reviewed-by: Nuno Sa <nuno.sa@analog.com> Link: https://patch.msgid.link/20240723-spi-axi-spi-engine-opt-bpw-v1-1-2625ba4c4387@baylibre.com Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
parent
8400291e28
commit
f8918ef126
|
|
@ -258,7 +258,7 @@ static void spi_engine_compile_message(struct spi_message *msg, bool dry,
|
|||
clk_div - 1));
|
||||
}
|
||||
|
||||
if (bits_per_word != xfer->bits_per_word) {
|
||||
if (bits_per_word != xfer->bits_per_word && xfer->len) {
|
||||
bits_per_word = xfer->bits_per_word;
|
||||
spi_engine_program_add_cmd(p, dry,
|
||||
SPI_ENGINE_CMD_WRITE(SPI_ENGINE_CMD_REG_XFER_BITS,
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user