Commit 83c522f
spi: don't check spi_controller::num_chipselect when parsing a dt device
Do not validate spi_controller::num_chipselect against SPI_CS_CNT_MAX
when parsing an spi device firmware node.
Firstly this is the wrong place, and this should be done while
registering/validating the controller. Secondly, there is no reason for
that check, as SPI_CS_CNT_MAX controls the amount of chipselects a
device may have, not a controller may have.
So drop that check as it needlessly limits controllers to SPI_CS_CNT_MAX
number of chipselects.
Likewise, drop the check for number of device chipselects larger than
controller's number of chipselects, as __spi_add_device() will already
catch that as either one of the chip selects will be out of range, or
there is a duplicate one.
Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
Link: https://patch.msgid.link/20250915183725.219473-6-jonas.gorski@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>1 parent f3982da commit 83c522f
1 file changed
Lines changed: 1 addition & 10 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2427 | 2427 | | |
2428 | 2428 | | |
2429 | 2429 | | |
2430 | | - | |
2431 | | - | |
2432 | | - | |
2433 | | - | |
2434 | | - | |
2435 | 2430 | | |
2436 | 2431 | | |
2437 | 2432 | | |
| |||
2440 | 2435 | | |
2441 | 2436 | | |
2442 | 2437 | | |
2443 | | - | |
2444 | | - | |
2445 | | - | |
2446 | | - | |
2447 | | - | |
| 2438 | + | |
2448 | 2439 | | |
2449 | 2440 | | |
2450 | 2441 | | |
| |||
0 commit comments