Skip to content

Raspberry Pi SPI unbind fixes

Lukas Wunner linux-spi 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest5 patches 12 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/5spi: Fix controller unregister orderdrivers/spi/spi.c+2 -15 replies
2/5spi: bcm2835: Fix controller unregister orderdrivers/spi/spi-bcm2835.c+3 -15 replies
3/5spi: bcm2835aux: Fix controller unregister orderdrivers/spi/spi-bcm2835aux.c+3 -10 replies
4/5spi: bcm2835: Tear down DMA before turning off SPI controllerdrivers/spi/spi-bcm2835.c+2 -20 replies
5/5spi: Document devm_spi_register_controller() gotchadrivers/spi/spi.c+7 -01 reply

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/5] Raspberry Pi SPI unbind fixes

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(-)
Signature · 1 line
2.26.2