public inbox for stable@vger.kernel.org
 help / color / mirror / Atom feed
From: clabbe.montjoie@gmail.com
To: ldewangan@nvidia.com,broonie@kernel.org,thierry.reding@gmail.com,jonathanh@nvidia.com,devnull+webgeek1234.gmail.com@kernel.org
Cc: linux-spi@vger.kernel.org,linux-tegra@vger.kernel.org,linux-kernel@vger.kernel.org,stable@vger.kernel.org,webgeek1234@gmail.com
Subject: Re: [PATCH] spi: tegra114: Use value to check for invalid delays
Date: Thu, 08 May 2025 03:34:28 -0700 (PDT)	[thread overview]
Message-ID: <681c88b4.df0a0220.27ca51.39ec@mx.google.com> (raw)
In-Reply-To: 20250506-spi-tegra114-fixup-v1-1-136dc2f732f3@gmail.com

> From: Aaron Kling <webgeek1234@gmail.com>
> 
> A delay unit of 0 is a valid entry, thus it is not valid to check for
> unused delays. Instead, check the value field; if that is zero, the
> given delay is unset.
> 
> Fixes: 4426e6b4ecf6 ("spi: tegra114: Don't fail set_cs_timing when delays are zero")
> Cc: stable@vger.kernel.org
> Signed-off-by: Aaron Kling <webgeek1234@gmail.com>
> ---
>  drivers/spi/spi-tegra114.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/spi/spi-tegra114.c b/drivers/spi/spi-tegra114.c
> index 2a8bb798e95b954fe573f1c50445ed2e7fcbfd78..795a8482c2c700c3768bd50bf59971256893a486 100644
> --- a/drivers/spi/spi-tegra114.c
> +++ b/drivers/spi/spi-tegra114.c
> @@ -728,9 +728,9 @@ static int tegra_spi_set_hw_cs_timing(struct spi_device *spi)
>  	u32 inactive_cycles;
>  	u8 cs_state;
>  
> -	if ((setup->unit && setup->unit != SPI_DELAY_UNIT_SCK) ||
> -	    (hold->unit && hold->unit != SPI_DELAY_UNIT_SCK) ||
> -	    (inactive->unit && inactive->unit != SPI_DELAY_UNIT_SCK)) {
> +	if ((setup->value && setup->unit != SPI_DELAY_UNIT_SCK) ||
> +	    (hold->value && hold->unit != SPI_DELAY_UNIT_SCK) ||
> +	    (inactive->value && inactive->unit != SPI_DELAY_UNIT_SCK)) {
>  		dev_err(&spi->dev,
>  			"Invalid delay unit %d, should be SPI_DELAY_UNIT_SCK\n",
>  			SPI_DELAY_UNIT_SCK);
> 
> ---
> base-commit: 0d8d44db295ccad20052d6301ef49ff01fb8ae2d
> change-id: 20250506-spi-tegra114-fixup-dbf6730db087
> 
> Best regards,
> -- 
> Aaron Kling <webgeek1234@gmail.com>
> 
> 
> 
> 

Tested-by: Corentin LABBE <clabbe.montjoie@gmail.com>
Tested-on: tegra124-jetson-tk1

Thanks
Regards

  parent reply	other threads:[~2025-05-08 10:34 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-05-06 18:36 [PATCH] spi: tegra114: Use value to check for invalid delays Aaron Kling via B4 Relay
2025-05-07 15:51 ` Jon Hunter
2025-05-08 10:34 ` clabbe.montjoie [this message]
2025-05-08 14:39 ` Mark Brown

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=681c88b4.df0a0220.27ca51.39ec@mx.google.com \
    --to=clabbe.montjoie@gmail.com \
    --cc=broonie@kernel.org \
    --cc=devnull+webgeek1234.gmail.com@kernel.org \
    --cc=jonathanh@nvidia.com \
    --cc=ldewangan@nvidia.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-spi@vger.kernel.org \
    --cc=linux-tegra@vger.kernel.org \
    --cc=stable@vger.kernel.org \
    --cc=thierry.reding@gmail.com \
    --cc=webgeek1234@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox