mbox series

[0/5] SPI core CS delay fixes and additions

Message ID 20230104093631.15611-1-marcan@marcan.st (mailing list archive)
Headers show
Series SPI core CS delay fixes and additions | expand

Message

Hector Martin Jan. 4, 2023, 9:36 a.m. UTC
Commits f6c911f3308c ("spi: dt-bindings: Introduce
spi-cs-setup-ns property") and 33a2fde5f77b ("spi: Introduce
spi-cs-setup-ns property") introduced a new property to represent the
CS setup delay in the device tree, but they have some issues:

- The property is only parsed as a 16-bit integer number of nanoseconds,
  which limits the maximum value to ~65us. This is not a reasonable
  upper limit, as some devices might need a lot more.
- The property name is inconsistent with other delay properties, which
  use a "*-delay-ns" naming scheme.
- Only the setup delay is introduced, but not the related hold and
  inactive delay times.

This series fixes the issues and adds support for the two missing
properties. Please pull in the first 3 patches as fixes for 6.2, to
avoid introducing a problematic DT API in this release. The last two
patches can wait until 6.3, though are probably harmless to throw in
as fixes too, since they're trivial.

Hector Martin (2):
  spi: dt-bindings: Rename spi-cs-setup-ns to spi-cs-setup-delay-ns
  spi: Rename spi-cs-setup-ns property to spi-cs-setup-delay-ns

Janne Grunau (3):
  spi: Use a 32-bit DT property for spi-cs-setup-delay-ns
  spi: dt-bindings: Add hold/inactive CS delay peripheral properties
  spi: Parse hold/inactive CS delay values from the DT

 .../bindings/spi/spi-peripheral-props.yaml    | 14 +++++++++--
 drivers/spi/spi.c                             | 24 +++++++++++++++----
 2 files changed, 32 insertions(+), 6 deletions(-)

Comments

Mark Brown Jan. 6, 2023, 4:33 p.m. UTC | #1
On Wed, 04 Jan 2023 18:36:26 +0900, Hector Martin wrote:
> Commits f6c911f3308c ("spi: dt-bindings: Introduce
> spi-cs-setup-ns property") and 33a2fde5f77b ("spi: Introduce
> spi-cs-setup-ns property") introduced a new property to represent the
> CS setup delay in the device tree, but they have some issues:
> 
> - The property is only parsed as a 16-bit integer number of nanoseconds,
>   which limits the maximum value to ~65us. This is not a reasonable
>   upper limit, as some devices might need a lot more.
> - The property name is inconsistent with other delay properties, which
>   use a "*-delay-ns" naming scheme.
> - Only the setup delay is introduced, but not the related hold and
>   inactive delay times.
> 
> [...]

Applied to

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

Thanks!

[1/5] spi: dt-bindings: Rename spi-cs-setup-ns to spi-cs-setup-delay-ns
      commit: 38892ea4cefbb6ed3a91e76d3af84a1f8077d2d4
[2/5] spi: Rename spi-cs-setup-ns property to spi-cs-setup-delay-ns
      commit: e0fe6a31cac84735939c29d1e05055d58325c6c0
[3/5] spi: Use a 32-bit DT property for spi-cs-setup-delay-ns
      (no commit info)
[4/5] spi: dt-bindings: Add hold/inactive CS delay peripheral properties
      (no commit info)
[5/5] spi: Parse hold/inactive CS delay values from the DT
      (no commit info)

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