i2c_unlock_bus(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… i2c_unlock_bus(9)

okay so bestie, welcome to the Kernel API Manual β€” yes, that's the manual name, and yes, it's giving "I read the kernel source for fun" energy. we're talking about i2c_unlock_bus today and honestly? she's the calm, responsible friend who hands the keys back after the road trip. iconic behaviour. 🫢


✨ NAME ✨

i2c_unlock_bus β€” release exclusive access to an I2C bus segment πŸŽ€

like, you grabbed the bus, you did your thing, and now you're politely letting go so everyone else can have a turn. manners! we love to see it. 🌸


πŸ¦‹ SYNOPSIS πŸ¦‹

void i2c_unlock_bus (struct i2c_adapter *adapter , unsigned int flags );

that's it. that's the whole vibe. returns nothing (it's a void, she doesn't owe you a status code πŸ’…), takes an adapter pointer and some flags, done. ✨


🌈 ARGUMENTS 🌈

  • adapter β€” the target I2C bus segment 🎯 like, which bus are we unlocking? that one. this pointer right here.
  • flags β€” okay so this is the "how much am I letting go of" dial, and there are exactly two moves:
    • I2C_LOCK_ROOT_ADAPTER β€” unlocks the root i2c adapter πŸ‘‘ the big one, the main character energy option
    • I2C_LOCK_SEGMENT β€” unlocks only this branch in the adapter tree 🌿 just your little corner of the family tree, not the whole thing

pick your fighter wisely, bestie. no cap. πŸ™ˆ


🧚 SEE ALSO 🧚

okay this list is long but I refuse to leave anyone out, they're all invited to the group chat πŸ’–

Kernel file ./include/linux/i2c.h β€” plus these legends:

go read all of them. or at least the lock/unlock trio. iykyk. πŸ”₯


alright that's the whole page, you ate that πŸ“ β€” mwah πŸ’‹

sourced from ./include/linux, dated October 2026 β€” so you know it's fresh off the tree πŸŽ€βœ¨

unlock responsibly, bestie πŸ‘‘πŸ’œ

πŸ“¦ where this page comes from