]> asedeno.scripts.mit.edu Git - linux.git/commit
spi: a3700: Change SPI mode before asserting chip-select
authorMaxime Chevallier <maxime.chevallier@smile.fr>
Tue, 10 Oct 2017 08:43:18 +0000 (10:43 +0200)
committerMark Brown <broonie@kernel.org>
Tue, 10 Oct 2017 09:17:06 +0000 (10:17 +0100)
commitdd7aa8d4b53b3484ba31ba56f3ff1be7deb38530
treeac3480bb36c82d2319bb4820a5b02c9d226521ba
parent5a866ec0014b2baa4ecbb1eaa19c835482829d08
spi: a3700: Change SPI mode before asserting chip-select

The spi device mode should be configured in the controller before the
chip-select is asserted, so that a clock polarity configuration change
is not interpreted as a clock tick by the device.

This patch moves the mode setting to the 'prepare_message' function
instead of the 'transfer_one' function.

By doing so, this patch also removes redundant code in
a3700_spi_clock_set.

This was tested on EspressoBin board, with spidev.

Signed-off-by: Maxime Chevallier <maxime.chevallier@smile.fr>
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/spi/spi-armada-3700.c