]> www.infradead.org Git - users/jedix/linux-maple.git/commit
spi: stm32: qspi: Fix dual flash mode sanity test in stm32_qspi_setup()
authorPatrice Chotard <patrice.chotard@foss.st.com>
Tue, 18 Jun 2024 13:29:49 +0000 (15:29 +0200)
committerMark Brown <broonie@kernel.org>
Tue, 18 Jun 2024 13:48:25 +0000 (14:48 +0100)
commitc2bd0791c5f02e964402624dfff45ca8995f5397
tree57578eb0655cdf021080770a6e7500f1abb287d5
parent60980cf5b8c8cc9182e5e9dbb62cbfd345c54074
spi: stm32: qspi: Fix dual flash mode sanity test in stm32_qspi_setup()

Misplaced parenthesis make test of mode wrong in case mode is equal to
SPI_TX_OCTAL or SPI_RX_OCTAL.

Simplify this sanity test, if one of this bit is set, property
cs-gpio must be present in DT.

Fixes: a557fca630cc ("spi: stm32_qspi: Add transfer_one_message() spi callback")
Cc: stable@vger.kernel.org
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Link: https://msgid.link/r/20240618132951.2743935-2-patrice.chotard@foss.st.com
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/spi/spi-stm32-qspi.c