i2c_lock_bus(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… i2c_lock_bus(9) β€” like, the actual Kernel API Manual page πŸŽ€

okay so bestie, welcome to the glow-up of i2c_lock_bus(9) from the Kernel API Manual ✨ this is the whole page, every crumb of it, just with the vibes turned ALL the way up. grab a boba and let's go πŸ§‹


✨ NAME ✨

i2c_lock_bus β€” get exclusive access to an I2C bus segment πŸ”’πŸ‘‘

like literally, you're claiming the bus. nobody else gets a turn until you say so. main character energy fr fr.


🌸 SYNOPSIS 🌸

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

yep that's it. that's the whole signature. void return so nothing comes back at you, and yes there's a space before that comma in the original β€” she's iconic, we keep her exactly as she is πŸ’…


πŸ¦‹ ARGUMENTS πŸ¦‹

  • adapter β€” target I2C bus segment 🎯 like, which bus are we locking? this one. the one you're pointing at.
  • flags β€” the vibe selector, two options and they are NOT the same:
    • I2C_LOCK_ROOT_ADAPTER β€” locks the root i2c adapter πŸ‘‘ goes all the way up to the top of the tree, no cap.
    • I2C_LOCK_SEGMENT β€” locks only this branch in the adapter tree 🌿 just your little corner, nothing else. very "this is my section" of it.

so pick your fighter: whole root, or just the segment. choose wisely bestie 🫢


πŸ’– SEE ALSO πŸ’–

this one comes with a whole friend group, they all live in the kernel file ./include/linux/i2c.h πŸ“‚ so go say hi to:

the whole squad, assembled 🌈 literally a group chat in ./include/linux/i2c.h, iykyk πŸ’€


and that's the page, bestie!! no notes, she ate πŸ’…βœ¨

sign-off time πŸŽ€ this one's from the ./include/linux source, dated October 2026, and it's filed under i2c_lock_bus(9) β€” mwah, go lock that bus πŸ‘‘πŸ’œ

πŸ“¦ where this page comes from