]> www.infradead.org Git - users/jedix/linux-maple.git/commit
spi: Fix SPI slave probe failure
authorAmit Kumar Mahapatra <amit.kumar-mahapatra@amd.com>
Mon, 17 Jun 2024 15:30:52 +0000 (21:00 +0530)
committerMark Brown <broonie@kernel.org>
Tue, 18 Jun 2024 20:16:15 +0000 (21:16 +0100)
commit2c1b7bbe253986619fa5623a13055316e730e746
tree47be0cd3074fd2a238c888886c4f354b8e7c6901
parentd6a711a898672dd873aab3844f754a3ca40723a5
spi: Fix SPI slave probe failure

While adding a SPI device, the SPI core ensures that multiple logical CS
doesn't map to the same physical CS. For example, spi->chip_select[0] !=
spi->chip_select[1] and so forth. However, unlike the SPI master, the SPI
slave doesn't have the list of chip selects, this leads to probe failure
when the SPI controller is configured as slave. Update the
__spi_add_device() function to perform this check only if the SPI
controller is configured as master.

Fixes: 4d8ff6b0991d ("spi: Add multi-cs memories support in SPI core")
Signed-off-by: Amit Kumar Mahapatra <amit.kumar-mahapatra@amd.com>
Link: https://msgid.link/r/20240617153052.26636-1-amit.kumar-mahapatra@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/spi/spi.c