Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
spi: fsl: Handle the single hardwired chipselect case
The Freescale MPC8xxx had a special quirk for handling a single hardwired chipselect, the case when we're using neither GPIO nor native chip select: when inspecting the device tree and finding zero "cs-gpios" on the device node the code would assume we have a single hardwired chipselect that leaves the device always selected. This quirk is not handled by the new core code, so we need to check the "cs-gpios" explicitly in the driver and set pdata->max_chipselect = 1 which will later fall through to the SPI master ->num_chipselect. Make sure not to assign the chip select handler in this case: there is no handling needed since the chip is always selected, and this is what the old code did as well. Cc: Christophe Leroy <[email protected]> Reported-by: Christophe Leroy <[email protected]> Fixes: 0f0581b ("spi: fsl: Convert to use CS GPIO descriptors") Signed-off-by: Linus Walleij <[email protected]> Tested-by: Christophe Leroy <[email protected]> (No tested the Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
- Loading branch information