spi: spi-microchip-core: Fix the number of chip selects supported
authorPrajna Rajendra Kumar <prajna.rajendrakumar@microchip.com>
Tue, 14 May 2024 10:45:07 +0000 (11:45 +0100)
committerMark Brown <broonie@kernel.org>
Mon, 27 May 2024 00:33:15 +0000 (01:33 +0100)
commita7ed3a11202d90939a3d00ffcc8cf50703cb7b35
treec9ce262f918d8a858be0d4ef6d867e67c3b3384e
parent3b4c0fbc19930af0904fb5995ed4e7b6ffe0b237
spi: spi-microchip-core: Fix the number of chip selects supported

The SPI "hard" controller in PolarFire SoC has eight CS lines, but only
one CS line is wired. When the 'num-cs' property is not specified in
the device tree, the driver defaults to the MAX_CS value, which has
been fixed to 1 to match the hardware configuration; however, when the
'num-cs' property is explicitly defined in the device tree, it
overrides the default value.

Fixes: 9ac8d17694b6 ("spi: add support for microchip fpga spi controllers")
Signed-off-by: Prajna Rajendra Kumar <prajna.rajendrakumar@microchip.com>
Reviewed-by: Conor Dooley <conor.dooley@microchip.com>
Link: https://msgid.link/r/20240514104508.938448-3-prajna.rajendrakumar@microchip.com
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/spi/spi-microchip-core.c