diff mbox series

spi: s3c64xx: clear loopback bit after loopback test

Message ID 20230711082020.138165-1-jaewon02.kim@samsung.com
State Accepted
Commit 9ec3c5517e22a12d2ff1b71e844f7913641460c6
Headers show
Series spi: s3c64xx: clear loopback bit after loopback test | expand

Commit Message

Jaewon Kim July 11, 2023, 8:20 a.m. UTC
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>
---
 drivers/spi/spi-s3c64xx.c | 2 ++
 1 file changed, 2 insertions(+)

Comments

Mark Brown July 11, 2023, 10:26 p.m. UTC | #1
On Wed, Jul 12, 2023 at 12:19:30AM +0200, Andi Shyti wrote:

> with the change suggested by Chanho:

> Reviewed-by: Andi Shyti <andi.shyti@kernel.org> 

> Mark, can you add the
> 
> Fixes: ffb7bcd3b27e ("spi: s3c64xx: support loopback mode")
> 
> tag or should Jaewon resend?

It's already in CI with that, b4 picks up fixes tags.
Mark Brown July 12, 2023, 3:34 p.m. UTC | #2
On Tue, 11 Jul 2023 17:20:20 +0900, Jaewon Kim wrote:
> 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.
> 
> 

Applied to

   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi.git for-next

Thanks!

[1/1] spi: s3c64xx: clear loopback bit after loopback test
      commit: 9ec3c5517e22a12d2ff1b71e844f7913641460c6

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark
diff mbox series

Patch

diff --git a/drivers/spi/spi-s3c64xx.c b/drivers/spi/spi-s3c64xx.c
index fd55697144cc..b6c2659a66ca 100644
--- a/drivers/spi/spi-s3c64xx.c
+++ b/drivers/spi/spi-s3c64xx.c
@@ -684,6 +684,8 @@  static int s3c64xx_spi_config(struct s3c64xx_spi_driver_data *sdd)
 
 	if ((sdd->cur_mode & SPI_LOOP) && sdd->port_conf->has_loopback)
 		val |= S3C64XX_SPI_MODE_SELF_LOOPBACK;
+	else
+		val &= ~S3C64XX_SPI_MODE_SELF_LOOPBACK;
 
 	writel(val, regs + S3C64XX_SPI_MODE_CFG);