]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
spi: spi-sun4i: fix early activation
authorAlessandro Grassi <alessandro.grassi@mailbox.org>
Fri, 2 May 2025 09:55:20 +0000 (11:55 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 4 Jun 2025 12:40:26 +0000 (14:40 +0200)
commitd8f13a8aeff61fb5de7998f17aa8d0c805c8e49f
treeaf9276358cd1aa58ad6ef4c5c26cb5c684ebb8b4
parent8f55d71b57e9d3513a5b4d6f342425812cbb3e81
spi: spi-sun4i: fix early activation

[ Upstream commit fb98bd0a13de2c9d96cb5c00c81b5ca118ac9d71 ]

The SPI interface is activated before the CPOL setting is applied. In
that moment, the clock idles high and CS goes low. After a short delay,
CPOL and other settings are applied, which may cause the clock to change
state and idle low. This transition is not part of a clock cycle, and it
can confuse the receiving device.

To prevent this unexpected transition, activate the interface while CPOL
and the other settings are being applied.

Signed-off-by: Alessandro Grassi <alessandro.grassi@mailbox.org>
Link: https://patch.msgid.link/20250502095520.13825-1-alessandro.grassi@mailbox.org
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/spi/spi-sun4i.c