diff options
author | Geert Uytterhoeven <geert+renesas@glider.be> | 2017-12-13 22:05:10 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2018-03-24 13:01:22 +0300 |
commit | 9854881c225a1c757616f126fad952a3e0910925 (patch) | |
tree | 74d47d96dd30d6e82d6e3e81981302d324af185d /lib/zlib_deflate | |
parent | 6467b3e254470a130872d8bb3e938500358795d5 (diff) | |
download | linux-9854881c225a1c757616f126fad952a3e0910925.tar.xz |
spi: sh-msiof: Avoid writing to registers from spi_master.setup()
[ Upstream commit 7ff0b53c4051145d1cf992d2f60987e6447eed4f ]
The spi_master.setup() callback must not change configuration registers,
as that could corrupt I/O that is in progress for other SPI slaves.
The only exception is the configuration of the native chip select
polarity in SPI master mode, as a wrong chip select polarity will cause
havoc during all future transfers to any other SPI slave.
Hence stop writing to registers in sh_msiof_spi_setup(), unless it is
the first call for a controller using a native chip select, or unless
native chip select polarity has changed (note that you'll loose anyway
if I/O is in progress). Even then, only do what is strictly necessary,
instead of calling sh_msiof_spi_set_pin_regs().
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'lib/zlib_deflate')
0 files changed, 0 insertions, 0 deletions