Skip to content
Commit b4e2adef authored by Stephan Olbrich's avatar Stephan Olbrich Committed by Mark Brown
Browse files

spi: bcm2835aux: set up spi-mode before asserting cs-gpio



When using reverse polarity for clock (spi-cpol) on a device
the clock line gets altered after chip-select has been asserted
resulting in an additional clock beat, which confuses hardware.

This happens due to the fact, the the hardware was initialized
and reset at the begin and end of each transfer which results
in default state for all lines except chip-select which is
handled by the spi-subsystem as gpio-cs is used.

To avoid this situation this patch moves the setup of polarity
(spi-cpol and spi-cpha) outside of the chip-select into
prepare_message, which is run prior to asserting chip-select.

Signed-off-by: default avatarStephan Olbrich <stephanolbrich@gmx.de>
Reviewed-by: default avatarMartin Sperl <kernel@martin.sperl.org>
Tested-by: default avatarMartin Sperl <kernel@martin.sperl.org>
Reviewed-by: default avatarEric Anholt <eric@anholt.net>
Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent f29ab184
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment