]> git.baikalelectronics.ru Git - kernel.git/commit
spi: atmel: Fix CS high support
authorGregory CLEMENT <gregory.clement@bootlin.com>
Thu, 17 Oct 2019 14:18:41 +0000 (16:18 +0200)
committerMark Brown <broonie@kernel.org>
Fri, 18 Oct 2019 17:27:01 +0000 (18:27 +0100)
commit6353e58430a0fe9b14f475e2d6ec7d6dacc04475
tree233f096ffb7028ae068e4abe4bcd0c127c8b2710
parent0e1a04a156ff9dbca927ceb9b7a7b714649faf09
spi: atmel: Fix CS high support

Until a few years ago, this driver was only used with CS GPIO. The
only exception is CS0 on AT91RM9200 which has to use internal CS. A
limitation of the internal CS is that they don't support CS High.

So by using the CS GPIO the CS high configuration was available except
for the particular case CS0 on RM9200.

When the support for the internal chip-select was added, the check of
the CS high support was not updated. Due to this the driver accepts
this configuration for all the SPI controller v2 (used by all SoCs
excepting the AT91RM9200) whereas the hardware doesn't support it for
infernal CS.

This patch fixes the test to match the hardware capabilities.

Fixes: 4a2ef090e69d ("spi: atmel: add support for the internal chip-select of the spi controller")
Cc: <stable@vger.kernel.org>
Signed-off-by: Gregory CLEMENT <gregory.clement@bootlin.com>
Link: https://lore.kernel.org/r/20191017141846.7523-3-gregory.clement@bootlin.com
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/spi/spi-atmel.c