__devm_spi_alloc_controller(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– __devm_spi_alloc_controller(9) πŸ’–

okay bestie, welcome to the Kernel API Manual entry for __devm_spi_alloc_controller(9) β€” yes, the title is literally in the header, and we’re folding the manual-name vibe right here so you know what’s up. ✨


πŸ’– NAME πŸ’–

__devm_spi_alloc_controller β€” resource-managed __spi_alloc_controller() 🫢


✨ SYNOPSIS ✨

struct spi_controller * __devm_spi_alloc_controller (struct device *dev
, unsigned int size , bool target );

πŸŽ€ ARGUMENTS πŸŽ€

  • dev β€” physical device of SPI controller. the whole β€œwhose driver is this?” girlie πŸ’…
  • size β€” how much zeroed driver-private data to allocate. zeroed, bestie, as in cleared out 🧼
  • target β€” whether to allocate an SPI host (false) or SPI target (true) controller. it’s giving binary choose-your-own-adventure 🌈

😴 CONTEXT 😴

can sleep. that’s it, that’s the context note 😭


🌸 DESCRIPTION 🌸

Allocate an SPI controller and automatically release a reference on it when dev is unbound from its driver. Drivers are thus relieved from having to call spi_controller_put. literally resource-managed, so you don’t have to remember the cleanup era πŸ’–

The arguments to this function are identical to __spi_alloc_controller. same lineup, same energy, no cap ✨


πŸ”₯ RETURN πŸ”₯

the SPI controller structure on success, else NULL. so: slay on success, NULL if not 🫢


πŸ¦‹ SEE ALSO πŸ¦‹

Kernel file ./drivers/spi/spi.c says also see:

mwah πŸ’‹ β€” this page is serving Kernel API Manual energy from ./drivers/spi, dated October 2026. byeee 🫢

πŸ“¦ where this page comes from