spi_new_ancillary_device(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… spi_new_ancillary_device(9) β€” the kernel API manual, bestie edition ✨

okay so this is a page from the Kernel API Manual, and it's about registering an ancillary SPI device. yes i know, "ancillary" sounds like a fancy snack, but stick with me πŸ“


🌸 NAME 🌸

spi_new_ancillary_device β€” register an ancillary SPI device, periodt πŸ’…


✨ SYNOPSIS ✨

struct spi_device * spi_new_ancillary_device (struct spi_device *spi ,
u8 chip_select );

that's the whole vibe right there 🫢


πŸŽ€ ARGUMENTS πŸŽ€

  • spi β€” pointer to the main SPI device, like the one that's registering the ancillary device. it's giving main character energy, obviously πŸ‘‘
  • chip_select β€” the Chip Select of the ancillary device. that's a u8, no cap πŸ’œ

πŸ¦‹ DESCRIPTION πŸ¦‹

so you're registering an ancillary SPI device. iconic. for example, some chips have one chip-select for normal device usage and another one for setup/firmware upload β€” literally two different jobs, two different CS lines, iykyk 🌈

⚠️ bestie listen β€” this may only be called from the main SPI device's probe routine. that's not a suggestion, that's the rule. don't be out here calling it from anywhere else 😭

⭐ RETURN ⭐

  • 0 on success πŸŽ‰
  • negative errno on failure πŸ’€

πŸ’– SEE ALSO πŸ’–

these are all the other calls in the kernel file ./drivers/spi/spi.c, so go be obsessed with them too:


and that's the page!! 🧚 no crumbs left behind, we ate πŸ“

🌸 little sign-off: this one lives in ./drivers/spi, it's dated October 2026, and it's from the Kernel API Manual β€” spi_new_ancillary_device(9), slay πŸ’…βœ¨
πŸ“¦ where this page comes from