Skip to content

Commit 9ec3c55

Browse files
jwn0222broonie
authored andcommitted
spi: s3c64xx: clear loopback bit after loopback test
When SPI loopback transfer is performed, S3C64XX_SPI_MODE_SELF_LOOPBACK bit still remained. It works as loopback even if the next transfer is not spi loopback mode. If not SPI_LOOP, needs to clear S3C64XX_SPI_MODE_SELF_LOOPBACK bit. Signed-off-by: Jaewon Kim <jaewon02.kim@samsung.com> Fixes: ffb7bcd ("spi: s3c64xx: support loopback mode") Reviewed-by: Chanho Park <chanho61.park@samsung.com> Link: https://lore.kernel.org/r/20230711082020.138165-1-jaewon02.kim@samsung.com Signed-off-by: Mark Brown <broonie@kernel.org>
1 parent 5158814 commit 9ec3c55

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

drivers/spi/spi-s3c64xx.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -684,6 +684,8 @@ static int s3c64xx_spi_config(struct s3c64xx_spi_driver_data *sdd)
684684

685685
if ((sdd->cur_mode & SPI_LOOP) && sdd->port_conf->has_loopback)
686686
val |= S3C64XX_SPI_MODE_SELF_LOOPBACK;
687+
else
688+
val &= ~S3C64XX_SPI_MODE_SELF_LOOPBACK;
687689

688690
writel(val, regs + S3C64XX_SPI_MODE_CFG);
689691

0 commit comments

Comments
 (0)