spi: mxs: support effective_speed_hz

Setting spi_transfer->effective_speed_hz in transfer_one_message so that
SPI client driver can use it.

Signed-off-by: Stefan Wahren <wahrenst@gmx.net>
Link: https://patch.msgid.link/20241209111316.4767-1-wahrenst@gmx.net
Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
Stefan Wahren 2024-12-09 12:13:16 +01:00 committed by Mark Brown
parent 8332e66709
commit a17162f0b2
No known key found for this signature in database
GPG Key ID: 24D68B725D5487D0

View File

@ -381,6 +381,8 @@ static int mxs_spi_transfer_one(struct spi_controller *host,
if (status)
break;
t->effective_speed_hz = ssp->clk_rate;
/* De-assert on last transfer, inverted by cs_change flag */
flag = (&t->transfer_list == m->transfers.prev) ^ t->cs_change ?
TXRX_DEASSERT_CS : 0;