[PATCH] spi: s3c64xx: clear loopback bit after loopback test

Chanho Park chanho61.park at samsung.com
Tue Jul 11 01:43:08 PDT 2023


Hi Jaewon,

> -----Original Message-----
> From: Jaewon Kim <jaewon02.kim at samsung.com>
> Sent: Tuesday, July 11, 2023 5:20 PM
> To: Andi Shyti <andi.shyti at kernel.org>; Mark Brown <broonie at kernel.org>;
> Krzysztof Kozlowski <krzysztof.kozlowski at linaro.org>; Alim Akhtar
> <alim.akhtar at samsung.com>
> Cc: linux-spi at vger.kernel.org; linux-samsung-soc at vger.kernel.org; linux-
> arm-kernel at lists.infradead.org; linux-kernel at vger.kernel.org; Chanho Park
> <chanho61.park at samsung.com>; Jaewon Kim <jaewon02.kim at samsung.com>
> Subject: [PATCH] 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.
> 

In order for this patch to be sent to the stable tree, below tag is required.
Fixes: ffb7bcd3b27e ("spi: s3c64xx: support loopback mode")

Otherwise, looks good to me.
Reviewed-by: Chanho Park <chanho61.park at samsung.com>

Best Regards,
Chanho Park

> Signed-off-by: Jaewon Kim <jaewon02.kim at samsung.com>
> ---
>  drivers/spi/spi-s3c64xx.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> 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);
> 
> --
> 2.17.1





More information about the linux-arm-kernel mailing list