mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-08-05 16:54:27 +00:00
spi: tegra114: Don't fail set_cs_timing when delays are zero
The original code would skip null delay pointers, but when the pointers
were converted to point within the spi_device struct, the check was not
updated to skip delays of zero. Hence all spi devices that didn't set
delays would fail to probe.
Fixes: 04e6bb0d6b
("spi: modify set_cs_timing parameter")
Cc: stable@vger.kernel.org
Signed-off-by: Aaron Kling <webgeek1234@gmail.com>
Link: https://patch.msgid.link/20250423-spi-tegra114-v1-1-2d608bcc12f9@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
parent
36fd627581
commit
4426e6b4ec
1 changed files with 3 additions and 3 deletions
|
@ -728,9 +728,9 @@ static int tegra_spi_set_hw_cs_timing(struct spi_device *spi)
|
||||||
u32 inactive_cycles;
|
u32 inactive_cycles;
|
||||||
u8 cs_state;
|
u8 cs_state;
|
||||||
|
|
||||||
if (setup->unit != SPI_DELAY_UNIT_SCK ||
|
if ((setup->unit && setup->unit != SPI_DELAY_UNIT_SCK) ||
|
||||||
hold->unit != SPI_DELAY_UNIT_SCK ||
|
(hold->unit && hold->unit != SPI_DELAY_UNIT_SCK) ||
|
||||||
inactive->unit != SPI_DELAY_UNIT_SCK) {
|
(inactive->unit && inactive->unit != SPI_DELAY_UNIT_SCK)) {
|
||||||
dev_err(&spi->dev,
|
dev_err(&spi->dev,
|
||||||
"Invalid delay unit %d, should be SPI_DELAY_UNIT_SCK\n",
|
"Invalid delay unit %d, should be SPI_DELAY_UNIT_SCK\n",
|
||||||
SPI_DELAY_UNIT_SCK);
|
SPI_DELAY_UNIT_SCK);
|
||||||
|
|
Loading…
Add table
Reference in a new issue