]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
spi: stm32: fix Overrun issue at < 8bpw
authorDeepak Kumar <deepak.kumar01@st.com>
Thu, 18 Dec 2025 10:48:28 +0000 (11:48 +0100)
committerMark Brown <broonie@kernel.org>
Thu, 18 Dec 2025 10:59:33 +0000 (10:59 +0000)
commit1ac3be217c01d5df55ec5052f81e4f1708f46552
tree744e0c63ba6538edab81002ce0d09651031ee0dc
parentc266d19b7d4e5ed993ed9fca25ab9d11789c41ee
spi: stm32: fix Overrun issue at < 8bpw

When SPI communication is suspended by hardware automatically, it could
happen that few bits of next frame are already clocked out due to
internal synchronization delay.

To achieve a safe suspension, we need to ensure that each word must be
at least 8 SPI clock cycles long. That's why, if bpw is less than 8
bits, we need to use midi to reach 8 SPI clock cycles at least.

This will ensure that each word achieve safe suspension and prevent
overrun condition.

Signed-off-by: Deepak Kumar <deepak.kumar01@st.com>
Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
Link: https://patch.msgid.link/20251218-stm32-spi-enhancements-v2-2-3b69901ca9fe@foss.st.com
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/spi/spi-stm32.c