spi: davinci: fix SPI_NO_CS functionality
The driver should not touch CS lines if SPI_NO_CS flag is set. This patch fixes it as this functionality was broken accidentally by commita88e34ea21("spi: davinci: add support to configure gpio cs through dt"). Fixes:a88e34ea21("spi: davinci: add support to configure gpio cs through dt") Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com> Signed-off-by: Mark Brown <broonie@linaro.org>
This commit is contained in:
		
							parent
							
								
									7d1311b93e
								
							
						
					
					
						commit
						3f2dad99f6
					
				| @ -417,16 +417,16 @@ static int davinci_spi_setup(struct spi_device *spi) | ||||
| 						  flags, dev_name(&spi->dev)); | ||||
| 			internal_cs = false; | ||||
| 		} | ||||
| 	} | ||||
| 
 | ||||
| 	if (retval) { | ||||
| 		dev_err(&spi->dev, "GPIO %d setup failed (%d)\n", | ||||
| 			spi->cs_gpio, retval); | ||||
| 		return retval; | ||||
| 	} | ||||
| 		if (retval) { | ||||
| 			dev_err(&spi->dev, "GPIO %d setup failed (%d)\n", | ||||
| 				spi->cs_gpio, retval); | ||||
| 			return retval; | ||||
| 		} | ||||
| 
 | ||||
| 	if (internal_cs) | ||||
| 		set_io_bits(dspi->base + SPIPC0, 1 << spi->chip_select); | ||||
| 		if (internal_cs) | ||||
| 			set_io_bits(dspi->base + SPIPC0, 1 << spi->chip_select); | ||||
| 	} | ||||
| 
 | ||||
| 	if (spi->mode & SPI_READY) | ||||
| 		set_io_bits(dspi->base + SPIPC0, SPIPC0_SPIENA_MASK); | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user