spi_bus_unlock(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… spi_bus_unlock(9) β€” the Kernel API Manual glow-up

okay bestie, so this is a page from the Kernel API Manual about spi_bus_unlock(9), and honestly? It's a short one but she's iconic in her simplicity. Let's get into it ✨


🌸 NAME 🌸

spi_bus_unlock β€” release the lock for exclusive SPI bus usage πŸŽ€

Like, you grabbed the aux cord, and now you're giving it back. Manners. We love to see it.


✨ SYNOPSIS ✨

int spi_bus_unlock (struct spi_controller *ctlr );

That's it. That's the whole vibe. One function, one argument, one int coming back at you πŸ’–


🫢 ARGUMENTS 🫢

  • ctlr β€” the SPI bus controller that was locked for exclusive bus access. yes queen, that one, the same controller you locked before. no switchesies πŸ”’

😴 CONTEXT 😴

can sleep

fr fr, this one is allowed to snooze. she's not in a rush, she's not in an interrupt, she's just vibing in a context that's permitted to sleep πŸ’€


πŸ‘‘ DESCRIPTION πŸ‘‘

Okay so here's the tea πŸ“: this call may only be used from a context that may sleep. That's non-negotiable, bestie β€” don't try to sneak it into an atomic context, it's giving "read the room".

And just so you know exactly what kind of nap we're talking about: the sleep is non-interruptible, and it has no timeout. Not "sleep until someone pokes you", not "sleep for a bit then give up" β€” it's the committed, all-in kind of sleep. main character energy ngl 😭

What this call actually does: it releases an SPI bus lock previously obtained by an spi_bus_lock call. So the lock has to already exist β€” you're the one undoing it, not creating it πŸ”“

⚠️ don't call this without having called spi_bus_lock first, okay? that's not a lock release, that's just chaos πŸ’€

πŸ”₯ RETURN πŸ”₯

always zero.

always. zero. every single time. no cap. she does not have a failure mode, she does not have opinions, she simply returns 0 and walks away πŸ’…βœ¨


🌈 SEE ALSO 🌈

aaaand here's the whole friend group 🫢 β€” all from the kernel file ./drivers/spi/spi.c:


and that's the whole page, bestie!! 🧚 mwah πŸ’‹

this little icon lives in ./drivers/spi, dated October 2026, and it's filed under spi_bus_unlock(9) β€” go forth and unlock responsibly, ily πŸŽ€πŸ’–

πŸ“¦ where this page comes from