mbox series

[0/8] spi: stm32: fix and enhancements for spi-stm32

Message ID 1612523342-10466-1-git-send-email-alain.volmat@foss.st.com
Headers show
Series spi: stm32: fix and enhancements for spi-stm32 | expand

Message

Alain Volmat Feb. 5, 2021, 11:08 a.m. UTC
The serie provides a fix for the spi-stm32 driver, allowing to properly
handle 0 byte transfer (and thus being able to run spi-loopback-test).

In addition to that, important enhancements are implemented, among them,
supporting transfer larger that what the IP can setup in one go or
allowing to use the SPI bus without cs_gpio.

Alain Volmat (5):
  spi: stm32: properly handle 0 byte transfer
  spi: stm32: do not mandate cs_gpio
  spi: stm32h7: ensure message are smaller than max size
  spi: stm32: defer probe for reset
  spi: stm32: make spurious and overrun interrupts visible

Amelie Delaunay (2):
  spi: stm32: use bitfield macros
  spi: stm32h7: replace private SPI_1HZ_NS with NSEC_PER_SEC

Etienne Carriere (1):
  spi: stm32: driver uses reset controller only at init

 drivers/spi/spi-stm32.c | 116 +++++++++++++++++++---------------------
 1 file changed, 54 insertions(+), 62 deletions(-)

Comments

Alain Volmat Feb. 5, 2021, 5:23 p.m. UTC | #1
Hi Mark,

sorry about that, I've just noticed the issue. This is probably due to
modification of patches ordering I did. STM32H7_SPI_TSIZE_MAX is introduced
in the PATCH 6/8 and this is the reason why PATCH 5/8 doesn't build properly.
I'll rework that to ensure that all patches compile properly.

Sorry again,
Alain

On Fri, Feb 05, 2021 at 04:41:54PM +0000, Mark Brown wrote:
> On Fri, Feb 05, 2021 at 12:08:59PM +0100, Alain Volmat wrote:
> > Defer the probe operation when a reset controller device is expected
> > but have not yet been probed.
> > 
> > This change replaces use of devm_reset_control_get_exclusive() with
> > devm_reset_control_get_optional_exclusive() as reset controller is
> > optional which is now explicitly stated.
> 
> This has trouble building an x86 allmodconfig build:
> 
> /mnt/kernel/drivers/spi/spi-stm32.c: In function 'stm32_spi_prepare_msg':
> /mnt/kernel/drivers/spi/spi-stm32.c:1022:9: error: 'STM32H7_SPI_TSIZE_MAX' undeclared (first use in this function); did you mean 'STM32H7_SPI_CR1_MASRX'?
>          STM32H7_SPI_TSIZE_MAX,
>          ^~~~~~~~~~~~~~~~~~~~~
>          STM32H7_SPI_CR1_MASRX
> /mnt/kernel/drivers/spi/spi-stm32.c:1022:9: note: each undeclared identifier is reported only once for each function it appears in
> 
> This may be due to an earlier patch in the series, my script is working
> back through the patch series.
Mark Brown Feb. 5, 2021, 8:16 p.m. UTC | #2
On Fri, 5 Feb 2021 12:08:54 +0100, Alain Volmat wrote:
> The serie provides a fix for the spi-stm32 driver, allowing to properly
> handle 0 byte transfer (and thus being able to run spi-loopback-test).
> 
> In addition to that, important enhancements are implemented, among them,
> supporting transfer larger that what the IP can setup in one go or
> allowing to use the SPI bus without cs_gpio.
> 
> [...]

Applied to

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

Thanks!

[2/8] spi: stm32: do not mandate cs_gpio
      commit: 8f8d0e3e33e36ba63416cad64b9a9ad6b0129eed
[3/8] spi: stm32h7: ensure message are smaller than max size
      commit: 084de5232820c9e857ccc2282c3d94f33f92a381
[4/8] spi: stm32: driver uses reset controller only at init
      commit: 1c75cfd53e213044523141b464eb06813e39ecea
[5/8] spi: stm32: defer probe for reset
      commit: c63b95b76e69b679b9b95014552db099eb77a4fa
[6/8] spi: stm32: use bitfield macros
      commit: 5a380b833ad437123dca91bf900a696709d9b6ab
[7/8] spi: stm32h7: replace private SPI_1HZ_NS with NSEC_PER_SEC
      commit: e1e2093b16cb1cefe4dc483b00e73d1333260784
[8/8] spi: stm32: make spurious and overrun interrupts visible
      commit: c64e7efe46b7de21937ef4b3594d9b1fc74f07df

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