spi: Setup the master controller driver before setting the chipselect
authorFranklin S Cooper Jr <fcooper@ti.com>
Fri, 16 Oct 2015 15:29:03 +0000 (10:29 -0500)
committerMark Brown <broonie@kernel.org>
Wed, 28 Oct 2015 00:34:18 +0000 (09:34 +0900)
commitabeedb0159eec42c52a28fc44457164f71aa12a9
tree0b66cf806bda18184acc6c99d6c1c5c7373d173d
parent6ff33f3902c3b1c5d0db6b1e2c70b6d76fba357f
spi: Setup the master controller driver before setting the chipselect

SPI controllers may need to be properly setup before chip selects
can be used. Therefore, wait until the spi controller has a chance
to perform their setup procedure before trying to use the chip
select.

This also insures that the chip selects pins are in a good
state before asseting them which otherwise may cause confusion.

Signed-off-by: Franklin S Cooper Jr <fcooper@ti.com>
Tested-by: Grygorii Strashko <grygorii.strashko@ti.com>
Tested-by: Ivan Khoronzhuk <ivan.khoronzhuk@linaro.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/spi/spi.c