]> git.ipfire.org Git - thirdparty/linux.git/commit
spi: geni-qcom: Fix CPHA and CPOL mode change detection
authorMaramaina Naresh <naresh.maramaina@oss.qualcomm.com>
Mon, 16 Mar 2026 13:23:31 +0000 (18:53 +0530)
committerMark Brown <broonie@kernel.org>
Mon, 16 Mar 2026 14:43:32 +0000 (14:43 +0000)
commitba3402f6c85bbeee5c11732c3aa4050a717e8f8f
tree70cc463a6fa7fda8c8e7fd82c3d41b3662c7329c
parent7fc5e2f5603cfb305d0a8071f56b5bdb55161aeb
spi: geni-qcom: Fix CPHA and CPOL mode change detection

setup_fifo_params computes mode_changed from spi->mode flags but tests
it against SE_SPI_CPHA and SE_SPI_CPOL, which are register offsets,
not SPI mode bits. This causes CPHA and CPOL updates to be skipped
on mode switches, leaving the controller with stale clock phase
and polarity settings.

Fix this by using SPI_CPHA and SPI_CPOL to detect mode changes before
updating the corresponding registers.

Fixes: 781c3e71c94c ("spi: spi-geni-qcom: rework setup_fifo_params")
Signed-off-by: Maramaina Naresh <naresh.maramaina@oss.qualcomm.com>
Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Link: https://patch.msgid.link/20260316-spi-geni-cpha-cpol-fix-v1-1-4cb44c176b79@oss.qualcomm.com
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/spi/spi-geni-qcom.c