Linux-SPI Archive on lore.kernel.org
 help / color / Atom feed
* [PATCH 0/5] Raspberry Pi SPI unbind fixes
@ 2020-05-15 15:58 Lukas Wunner
  2020-05-15 15:58 ` [PATCH 1/5] spi: Fix controller unregister order Lukas Wunner
                   ` (5 more replies)
  0 siblings, 6 replies; 18+ messages in thread
From: Lukas Wunner @ 2020-05-15 15:58 UTC (permalink / raw)
  To: Mark Brown
  Cc: Nicolas Saenz Julienne, Martin Sperl, linux-spi,
	linux-rpi-kernel, Linus Walleij, Jingoo Han

This series fixes ordering issues occurring on unbind of the
Raspberry Pi SPI drivers:

Turns out devm_spi_register_controller() is prone to
incorrect use and dozens of drivers have gotten it wrong.
I'm only documenting this gotcha here and fixing it in the
Raspberry Pi drivers.  Fixing the rest is for another day.

There's also an ordering issue in the core which has been
present for 8 years and affects all platforms (patch [1/5]).
Doesn't look like unbinding is tested all that often. :-)


Lukas Wunner (5):
  spi: Fix controller unregister order
  spi: bcm2835: Fix controller unregister order
  spi: bcm2835aux: Fix controller unregister order
  spi: bcm2835: Tear down DMA before turning off SPI controller
  spi: Document devm_spi_register_controller() gotcha

 drivers/spi/spi-bcm2835.c    |  8 +++++---
 drivers/spi/spi-bcm2835aux.c |  4 +++-
 drivers/spi/spi.c            | 10 +++++++++-
 3 files changed, 17 insertions(+), 5 deletions(-)

-- 
2.26.2


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

end of thread, back to index

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-15 15:58 [PATCH 0/5] Raspberry Pi SPI unbind fixes Lukas Wunner
2020-05-15 15:58 ` [PATCH 1/5] spi: Fix controller unregister order Lukas Wunner
2020-05-15 16:27   ` Mark Brown
2020-05-15 16:31     ` Lukas Wunner
2020-05-15 21:37       ` Andy Shevchenko
2020-05-16  6:45         ` Lukas Wunner
2020-05-16  9:45           ` Andy Shevchenko
2020-05-15 15:58 ` [PATCH 2/5] spi: bcm2835: " Lukas Wunner
2020-05-15 16:29   ` Mark Brown
2020-05-15 16:44     ` Lukas Wunner
2020-05-15 21:33       ` Andy Shevchenko
2020-05-16  6:56         ` Lukas Wunner
2020-05-16  9:40           ` Andy Shevchenko
2020-05-15 15:58 ` [PATCH 3/5] spi: bcm2835aux: " Lukas Wunner
2020-05-15 15:58 ` [PATCH 4/5] spi: bcm2835: Tear down DMA before turning off SPI controller Lukas Wunner
2020-05-15 15:58 ` [PATCH 5/5] spi: Document devm_spi_register_controller() gotcha Lukas Wunner
2020-05-15 16:30   ` Mark Brown
2020-05-20 17:17 ` [PATCH 0/5] Raspberry Pi SPI unbind fixes Mark Brown

Linux-SPI Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-spi/0 linux-spi/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-spi linux-spi/ https://lore.kernel.org/linux-spi \
		linux-spi@vger.kernel.org
	public-inbox-index linux-spi

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-spi


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git