linux-spi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] spi: s3c64xx: clear loopback bit after loopback test
       [not found] <CGME20230711082508epcas2p3088d488035e7e2910bf087d640e9c268@epcas2p3.samsung.com>
@ 2023-07-11  8:20 ` Jaewon Kim
  2023-07-11  8:43   ` Chanho Park
                     ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Jaewon Kim @ 2023-07-11  8:20 UTC (permalink / raw)
  To: Andi Shyti, Mark Brown, Krzysztof Kozlowski, Alim Akhtar
  Cc: linux-spi, linux-samsung-soc, linux-arm-kernel, linux-kernel,
	Chanho Park, Jaewon Kim

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(+)

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


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* RE: [PATCH] spi: s3c64xx: clear loopback bit after loopback test
  2023-07-11  8:20 ` [PATCH] spi: s3c64xx: clear loopback bit after loopback test Jaewon Kim
@ 2023-07-11  8:43   ` Chanho Park
  2023-07-11 22:19   ` Andi Shyti
  2023-07-12 15:34   ` Mark Brown
  2 siblings, 0 replies; 5+ messages in thread
From: Chanho Park @ 2023-07-11  8:43 UTC (permalink / raw)
  To: 'Jaewon Kim', 'Andi Shyti', 'Mark Brown',
	'Krzysztof Kozlowski', 'Alim Akhtar'
  Cc: linux-spi, linux-samsung-soc, linux-arm-kernel, linux-kernel

Hi Jaewon,

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

Best Regards,
Chanho Park

> Signed-off-by: Jaewon Kim <jaewon02.kim@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



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] spi: s3c64xx: clear loopback bit after loopback test
  2023-07-11  8:20 ` [PATCH] spi: s3c64xx: clear loopback bit after loopback test Jaewon Kim
  2023-07-11  8:43   ` Chanho Park
@ 2023-07-11 22:19   ` Andi Shyti
  2023-07-11 22:26     ` Mark Brown
  2023-07-12 15:34   ` Mark Brown
  2 siblings, 1 reply; 5+ messages in thread
From: Andi Shyti @ 2023-07-11 22:19 UTC (permalink / raw)
  To: Jaewon Kim
  Cc: Mark Brown, Krzysztof Kozlowski, Alim Akhtar, linux-spi,
	linux-samsung-soc, linux-arm-kernel, linux-kernel, Chanho Park

Hi Jaewon,

On Tue, Jul 11, 2023 at 05:20:20PM +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.
> 
> Signed-off-by: Jaewon Kim <jaewon02.kim@samsung.com>

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?

Thanks,
Andi

> ---
>  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
> 

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] spi: s3c64xx: clear loopback bit after loopback test
  2023-07-11 22:19   ` Andi Shyti
@ 2023-07-11 22:26     ` Mark Brown
  0 siblings, 0 replies; 5+ messages in thread
From: Mark Brown @ 2023-07-11 22:26 UTC (permalink / raw)
  To: Andi Shyti
  Cc: Jaewon Kim, Krzysztof Kozlowski, Alim Akhtar, linux-spi,
	linux-samsung-soc, linux-arm-kernel, linux-kernel, Chanho Park

[-- Attachment #1: Type: text/plain, Size: 344 bytes --]

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.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] spi: s3c64xx: clear loopback bit after loopback test
  2023-07-11  8:20 ` [PATCH] spi: s3c64xx: clear loopback bit after loopback test Jaewon Kim
  2023-07-11  8:43   ` Chanho Park
  2023-07-11 22:19   ` Andi Shyti
@ 2023-07-12 15:34   ` Mark Brown
  2 siblings, 0 replies; 5+ messages in thread
From: Mark Brown @ 2023-07-12 15:34 UTC (permalink / raw)
  To: Andi Shyti, Krzysztof Kozlowski, Alim Akhtar, Jaewon Kim
  Cc: linux-spi, linux-samsung-soc, linux-arm-kernel, linux-kernel,
	Chanho Park

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


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2023-07-12 15:34 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <CGME20230711082508epcas2p3088d488035e7e2910bf087d640e9c268@epcas2p3.samsung.com>
2023-07-11  8:20 ` [PATCH] spi: s3c64xx: clear loopback bit after loopback test Jaewon Kim
2023-07-11  8:43   ` Chanho Park
2023-07-11 22:19   ` Andi Shyti
2023-07-11 22:26     ` Mark Brown
2023-07-12 15:34   ` Mark Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).