* [PATCH] spi: tegra114: Use value to check for invalid delays
@ 2025-05-06 18:36 Aaron Kling via B4 Relay
2025-05-07 15:51 ` Jon Hunter
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Aaron Kling via B4 Relay @ 2025-05-06 18:36 UTC (permalink / raw)
To: Laxman Dewangan, Mark Brown, Thierry Reding, Jonathan Hunter
Cc: linux-spi, linux-tegra, linux-kernel, stable, Aaron Kling
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>
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] spi: tegra114: Use value to check for invalid delays
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
2025-05-08 14:39 ` Mark Brown
2 siblings, 0 replies; 4+ messages in thread
From: Jon Hunter @ 2025-05-07 15:51 UTC (permalink / raw)
To: webgeek1234, Laxman Dewangan, Mark Brown, Thierry Reding
Cc: linux-spi, linux-tegra, linux-kernel, stable
On 06/05/2025 19:36, Aaron Kling via B4 Relay wrote:
> 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
That looks better to me.
Reviewed-by: Jon Hunter <jonathanh@nvidia.com>
Thanks
Jon
--
nvpublic
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] spi: tegra114: Use value to check for invalid delays
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
2025-05-08 14:39 ` Mark Brown
2 siblings, 0 replies; 4+ messages in thread
From: clabbe.montjoie @ 2025-05-08 10:34 UTC (permalink / raw)
To: ldewangan, broonie, thierry.reding, jonathanh,
devnull+webgeek1234.gmail.com
Cc: linux-spi, linux-tegra, linux-kernel, stable, webgeek1234
> 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
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] spi: tegra114: Use value to check for invalid delays
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
@ 2025-05-08 14:39 ` Mark Brown
2 siblings, 0 replies; 4+ messages in thread
From: Mark Brown @ 2025-05-08 14:39 UTC (permalink / raw)
To: Laxman Dewangan, Thierry Reding, Jonathan Hunter, Aaron Kling
Cc: linux-spi, linux-tegra, linux-kernel, stable
On Tue, 06 May 2025 13:36:59 -0500, Aaron Kling wrote:
> 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.
>
>
Applied to
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi.git for-next
Thanks!
[1/1] spi: tegra114: Use value to check for invalid delays
commit: e979a7c79fbc706f6dac913af379ef4caa04d3d5
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] 4+ messages in thread
end of thread, other threads:[~2025-05-08 14:39 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
2025-05-08 14:39 ` 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).