spi: cadence-qspi: report correct number of chip-select
authorThéo Lebrun <theo.lebrun@bootlin.com>
Fri, 9 Feb 2024 13:45:32 +0000 (14:45 +0100)
committerMark Brown <broonie@kernel.org>
Wed, 21 Feb 2024 16:27:20 +0000 (16:27 +0000)
commit0f3841a5e1152eca1a58cfbd9ceb6d311aa7e647
tree03c0890580c5fa16ef14118f57de362b689d42d0
parent7cc3522aedb5f4360c4502b2e89b279b7aa94ceb
spi: cadence-qspi: report correct number of chip-select

Set the ->num_chipselect field in struct cqspi_st and struct
spi_controller to the current number of chip-select. The value is
dependent on declared flashes in devicetree.

Previously, the num-cs property from devicetree or the maximum value was
being reported.

Signed-off-by: Théo Lebrun <theo.lebrun@bootlin.com>
Link: https://msgid.link/r/20240209-cdns-qspi-cs-v1-3-a4f9dfed9ab4@bootlin.com
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/spi/spi-cadence-quadspi.c