spi: imx: only do necessary changes to ECSPIx_CONFIGREG
authorKnut Wohlrab <knut.wohlrab@de.bosch.com>
Tue, 15 Mar 2016 13:24:36 +0000 (14:24 +0100)
committerMark Brown <broonie@kernel.org>
Thu, 17 Mar 2016 11:44:11 +0000 (11:44 +0000)
commit793c7f9212fdb7bea5e017427e750afa11217c29
treefe54e12fbc83bf8fd2cb7f40184bfbd215d0d48d
parentc508709bcffb644afbf5e5016fc7c90bf80c30ff
spi: imx: only do necessary changes to ECSPIx_CONFIGREG

If the SPI chip select (CS) for a dedicated channel is done manually by
the used higher device driver, the CS may be active while writing to
ECSPIx_CONFIGREG. To prevent unwanted clock edges when selecting
the clock mode,  only do the necessary changes to the i.MX SPI
configuration register and leave not selected channels untouched.

To prevent unwanted clock edges on first use, an empty dummy
transmission shall be done by the initialization procedure of the device
driver of this channel. This will set the clock mode to the correct state.

Signed-off-by: Knut Wohlrab <knut.wohlrab@de.bosch.com>
Signed-off-by: Dirk Behme <dirk.behme@de.bosch.com>
Acked-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/spi/spi-imx.c
This page took 0.025383 seconds and 5 git commands to generate.